public class ObjectBigLists extends Object
Collections
,
BigList
Modifier and Type | Class and Description |
---|---|
static class |
ObjectBigLists.EmptyBigList<K>
An immutable class representing an empty type-specific big list.
|
static class |
ObjectBigLists.ListBigList<K>
A class exposing a list as a big list.
|
static class |
ObjectBigLists.Singleton<K>
An immutable class representing a type-specific singleton big list.
|
static class |
ObjectBigLists.SynchronizedBigList<K>
A synchronized wrapper class for big lists.
|
static class |
ObjectBigLists.UnmodifiableBigList<K>
An unmodifiable wrapper class for big lists.
|
Modifier and Type | Field and Description |
---|---|
static ObjectBigLists.EmptyBigList |
EMPTY_BIG_LIST
An empty big list (immutable).
|
Modifier and Type | Method and Description |
---|---|
static <K> ObjectBigList<K> |
asBigList(ObjectList<K> list)
Returns a big list backed by the specified list.
|
static <K> ObjectBigList<K> |
shuffle(ObjectBigList<K> l,
Random random)
Shuffles the specified big list using the specified pseudorandom number generator.
|
static <K> ObjectBigList<K> |
singleton(K element)
Returns a type-specific immutable big list containing only the specified element.
|
static <K> ObjectBigList<K> |
synchronize(ObjectBigList<K> l)
Returns a synchronized type-specific big list backed by the given type-specific big list.
|
static <K> ObjectBigList<K> |
synchronize(ObjectBigList<K> l,
Object sync)
Returns a synchronized type-specific big list backed by the given type-specific big list, using an assigned object to synchronize.
|
static <K> ObjectBigList<K> |
unmodifiable(ObjectBigList<K> l)
Returns an unmodifiable type-specific big list backed by the given type-specific big list.
|
public static final ObjectBigLists.EmptyBigList EMPTY_BIG_LIST
The class of this objects represent an abstract empty list
that is a sublist of any type of list. Thus, EMPTY_BIG_LIST
may be assigned to a variable of any (sorted) type-specific list.
public static <K> ObjectBigList<K> shuffle(ObjectBigList<K> l, Random random)
l
- the big list to be shuffled.random
- a pseudorandom number generator (please use a XorShift* generator).l
.public static <K> ObjectBigList<K> singleton(K element)
element
- the only element of the returned big list.element
.public static <K> ObjectBigList<K> synchronize(ObjectBigList<K> l)
l
- the big list to be wrapped in a synchronized big list.Collections.synchronizedList(List)
public static <K> ObjectBigList<K> synchronize(ObjectBigList<K> l, Object sync)
l
- the big list to be wrapped in a synchronized big list.sync
- an object that will be used to synchronize the access to the big list.Collections.synchronizedList(List)
public static <K> ObjectBigList<K> unmodifiable(ObjectBigList<K> l)
l
- the big list to be wrapped in an unmodifiable big list.Collections.unmodifiableList(List)
public static <K> ObjectBigList<K> asBigList(ObjectList<K> list)
list
- a list.