|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.acegisecurity.domain.util.CollectionUtils
public class CollectionUtils
Some utility methods to use Collections.
| Constructor Summary | |
|---|---|
CollectionUtils()
|
|
| Method Summary | ||
|---|---|---|
static
|
add(List<E> list,
E object)
Add an object to a List and return the result. |
|
static
|
add(Set<E> set,
E object)
Add an object to a Set and return the result. |
|
static
|
clone(Collection<E> collection)
Clone a Collection copying all its elements to a new one. |
|
static
|
clone(Map<K,V> map)
Clone a Map copying all its elements to a new one. |
|
static boolean |
isCollection(Class theClass)
|
|
static boolean |
isMap(Class theClass)
|
|
static
|
newList(E object)
Return a List (actually an ArrayList) with only
that object. |
|
static
|
newSet(E object)
Return a Set (actually a HashSet) with only that
object. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CollectionUtils()
| Method Detail |
|---|
public static boolean isCollection(Class theClass)
public static boolean isMap(Class theClass)
public static <E> Set<E> add(Set<E> set,
E object)
Set and return the result.
set - object -
public static <E> List<E> add(List<E> list,
E object)
List and return the result.
list - object -
public static <E> Collection<E> clone(Collection<E> collection)
null return null.
collection -
IllegalArgumentException - DOCUMENT ME!public static <K,V> Map<K,V> clone(Map<K,V> map)
Map copying all its elements to a new one. If the
passed argument is null, the method will return
null.
map - to copy
Map passed as an argument
IllegalArgumentException - if the Map implementation
is not supported by this methodpublic static <E> List<E> newList(E object)
List (actually an ArrayList) with only
that object.
object -
public static <E> Set<E> newSet(E object)
Set (actually a HashSet) with only that
object.
object -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||