|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.common.util.tools.CollectionUtils
public final class CollectionUtils
At the contrary of collections in the class Collections
, these collections do not throw any access exception
Field Summary | |
---|---|
static List |
EMPTY_LIST
The empty list (immutable but does not throw any exception). |
static Set |
EMPTY_SET
The empty set (immutable). |
Method Summary | ||
---|---|---|
static
|
emptyList()
Returns the empty list (immutable). |
|
static
|
emptySet()
Returns the empty set (immutable). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Set EMPTY_SET
emptySet()
public static final List EMPTY_LIST
emptyList()
Method Detail |
---|
public static final <T> Set<T> emptySet()
This example illustrates the type-safe way to obtain an empty set:
Set<String> s = Collections.emptySet();Implementation note: Implementations of this method need not create a separate Set object for each call. Using this method is likely to have comparable cost to using the like-named field. (Unlike this method, the field does not provide type safety.)
EMPTY_SET
public static <T> List<T> emptyList()
This example illustrates the type-safe way to obtain an empty list:
List<String> s = Collections.emptyList();Implementation note: Implementations of this method need not create a separate List object for each call. Using this method is likely to have comparable cost to using the like-named field. (Unlike this method, the field does not provide type safety.)
EMPTY_LIST
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |