public class ObjectCollections
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ObjectCollections.EmptyCollection<T>
Empty Collection implementation for the empty collection function
|
static class |
ObjectCollections.SynchronizedCollection<T>
Synchronized Collection Wrapper for the synchronizedCollection function
|
static class |
ObjectCollections.UnmodifiableCollection<T>
Unmodifyable Collection Wrapper for the unmodifyableCollection method
|
| Modifier and Type | Field and Description |
|---|---|
static ObjectCollection<?> |
EMPTY
Empty Collection Reference
|
| Constructor and Description |
|---|
ObjectCollections() |
| Modifier and Type | Method and Description |
|---|---|
static <T> ObjectCollection<T> |
empty()
Returns a Immutable EmptyCollection instance that is automatically casted.
|
static <T> ObjectCollection<T> |
synchronize(ObjectCollection<T> c)
Returns a synchronized Collection instance based on the instance given.
|
static <T> ObjectCollection<T> |
synchronize(ObjectCollection<T> c,
java.lang.Object mutex)
Returns a synchronized Collection instance based on the instance given.
|
static <T> ObjectCollection<T> |
unmodifiable(ObjectCollection<T> c)
Returns a Immutable Collection instance based on the instance given.
|
public static final ObjectCollection<?> EMPTY
public static <T> ObjectCollection<T> empty()
T - the type of elements maintained by this Collectionpublic static <T> ObjectCollection<T> unmodifiable(ObjectCollection<T> c)
T - the type of elements maintained by this Collectionc - that should be made immutable/unmodifiablepublic static <T> ObjectCollection<T> synchronize(ObjectCollection<T> c)
T - the type of elements maintained by this Collectionc - that should be synchronizedpublic static <T> ObjectCollection<T> synchronize(ObjectCollection<T> c, java.lang.Object mutex)
T - the type of elements maintained by this Collectionc - that should be synchronizedmutex - is the controller of the synchronization block.