|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.cache.util.Immutables
public class Immutables
Factory for generating immutable type wrappers.
| Nested Class Summary | |
|---|---|
static interface |
Immutables.Immutable
|
| Constructor Summary | |
|---|---|
Immutables()
|
|
| Method Summary | ||
|---|---|---|
static
|
immutableCollectionCopy(Collection<? extends T> collection)
Creates a new immutable copy of the specified Collection. |
|
static
|
immutableListConvert(Collection<? extends T> source)
Converts a Collection to an immutable List by copying it. |
|
static
|
immutableListCopy(List<? extends T> list)
Creates an immutable copy of the list. |
|
static
|
immutableListMerge(List<? extends T> list1,
List<? extends T> list2)
Creates a new immutable list containing the union (combined entries) of both lists. |
|
static
|
immutableListWrap(T... array)
Wraps an array with an immutable list. |
|
static
|
immutableMapCopy(Map<? extends K,? extends V> map)
Creates an immutable copy of the specified map. |
|
static
|
immutableMapWrap(Map<? extends K,? extends V> map)
Wraps a map with an immutable map. |
|
static
|
immutableSetConvert(Collection<? extends T> collection)
Converts a Collections into an immutable Set by copying it. |
|
static
|
immutableSetCopy(Set<? extends T> set)
Creates an immutable copy of the specified set. |
|
static
|
immutableSetWrap(Set<? extends T> set)
Wraps a set with an immutable set. |
|
static boolean |
isImmutable(Object o)
Whether or not this collection type is immutable |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Immutables()
| Method Detail |
|---|
public static boolean isImmutable(Object o)
o - a Collection, Set, List, or Map
public static <T> List<T> immutableListConvert(Collection<? extends T> source)
source - the collection to convert
public static <T> List<T> immutableListCopy(List<? extends T> list)
list - the list to copy
public static <T> List<T> immutableListWrap(T... array)
T - array - the array to wrap
public static <T> List<T> immutableListMerge(List<? extends T> list1,
List<? extends T> list2)
list1 - contains the first elements of the new listlist2 - contains the successor elements of the new list
public static <T> Set<T> immutableSetConvert(Collection<? extends T> collection)
collection - the collection to convert/copy
public static <T> Set<T> immutableSetWrap(Set<? extends T> set)
set - the set to wrap
public static <T> Set<T> immutableSetCopy(Set<? extends T> set)
set - the set to copy from
public static <K,V> Map<K,V> immutableMapWrap(Map<? extends K,? extends V> map)
map - the map to wrap
public static <K,V> Map<K,V> immutableMapCopy(Map<? extends K,? extends V> map)
map - the map to copy from
public static <T> Collection<T> immutableCollectionCopy(Collection<? extends T> collection)
collection - the collection to copy
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||