public class ObjectLists
extends java.lang.Object
| Constructor and Description |
|---|
ObjectLists() |
| Modifier and Type | Method and Description |
|---|---|
static <T> speiger.src.collections.objects.utils.ObjectLists.EmptyList<T> |
empty()
Returns a Immutable EmptyList instance that is automatically casted.
|
static <T> ObjectList<T> |
reverse(ObjectList<T> list)
Reverses the list
|
static <T> ObjectList<T> |
shuffle(ObjectList<T> list)
Shuffles the list
|
static <T> ObjectList<T> |
shuffle(ObjectList<T> list,
java.util.Random random)
Shuffles the list
|
static <T> ObjectList<T> |
singleton(T element)
Creates a Unmodifiable Singleton list
|
static <T> ObjectList<T> |
synchronize(ObjectList<T> l)
Returns a synchronized List instance based on the instance given.
|
static <T> ObjectList<T> |
synchronize(ObjectList<T> l,
java.lang.Object mutex)
Returns a synchronized List instance based on the instance given.
|
static <T> ObjectList<T> |
unmodifiable(ObjectList<T> l)
Returns a Immutable List instance based on the instance given.
|
public static <T> speiger.src.collections.objects.utils.ObjectLists.EmptyList<T> empty()
T - the type of elements maintained by this Collectionpublic static <T> ObjectList<T> unmodifiable(ObjectList<T> l)
T - the type of elements maintained by this Collectionl - that should be made immutable/unmodifiablepublic static <T> ObjectList<T> synchronize(ObjectList<T> l)
T - the type of elements maintained by this Collectionl - that should be synchronizedpublic static <T> ObjectList<T> synchronize(ObjectList<T> l, java.lang.Object mutex)
T - the type of elements maintained by this Collectionl - that should be synchronizedmutex - is the controller of the synchronization block.public static <T> ObjectList<T> singleton(T element)
T - the type of elements maintained by this Collectionelement - that should be used in the Singletonpublic static <T> ObjectList<T> reverse(ObjectList<T> list)
T - the type of elements maintained by this Collectionlist - that should be reversed.public static <T> ObjectList<T> shuffle(ObjectList<T> list)
T - the type of elements maintained by this Collectionlist - that should be Shuffled.public static <T> ObjectList<T> shuffle(ObjectList<T> list, java.util.Random random)
T - the type of elements maintained by this Collectionlist - that should be Shuffled.random - the random that should be used