|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.shiro.util.CollectionUtils
public class CollectionUtils
Static helper class for use dealing with Collections.
| Constructor Summary | |
|---|---|
CollectionUtils()
|
|
| Method Summary | ||
|---|---|---|
static
|
asList(E... elements)
|
|
static
|
asSet(E... elements)
|
|
static boolean |
isEmpty(Collection c)
Returns true if the specified Collection is null or empty,
false otherwise. |
|
static boolean |
isEmpty(Map m)
Returns true if the specified Map is null or empty,
false otherwise. |
|
static boolean |
isEmpty(PrincipalCollection principals)
Returns true if the specified PrincipalCollection is null or
empty, false otherwise. |
|
static int |
size(Collection c)
Returns the size of the specified collection or 0 if the collection is null. |
|
static int |
size(Map m)
Returns the size of the specified map or 0 if the map is null. |
|
| 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 <E> Set<E> asSet(E... elements)
public static boolean isEmpty(Collection c)
true if the specified Collection is null or empty,
false otherwise.
c - the collection to check
true if the specified Collection is null or empty,
false otherwise.public static boolean isEmpty(Map m)
true if the specified Map is null or empty,
false otherwise.
m - the Map to check
true if the specified Map is null or empty,
false otherwise.public static int size(Collection c)
0 if the collection is null.
c - the collection to check
0 if the collection is null.public static int size(Map m)
0 if the map is null.
m - the map to check
0 if the map is null.public static boolean isEmpty(PrincipalCollection principals)
true if the specified PrincipalCollection is null or
empty, false otherwise.
principals - the principals to check.
true if the specified PrincipalCollection is null or
empty, false otherwise.public static <E> List<E> asList(E... elements)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||