Class CollectionUtils
java.lang.Object
org.apache.shiro.util.CollectionUtils
Static helper class for use dealing with Collections.
- Since:
- 0.9
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E> List<E> asList(E... elements) static <E> Set<E> asSet(E... elements) static booleanstatic booleanstatic booleanisEmpty(PrincipalCollection principals) Deprecated.Use PrincipalCollection.isEmpty() directly.static intsize(Collection c) Returns the size of the specified collection or0if the collection isnull.static intReturns the size of the specified map or0if the map isnull.
-
Method Details
-
asSet
-
isEmpty
- Parameters:
c- the collection to check- Returns:
trueif the specifiedCollectionisnullorempty,falseotherwise.- Since:
- 1.0
-
isEmpty
-
size
Returns the size of the specified collection or0if the collection isnull.- Parameters:
c- the collection to check- Returns:
- the size of the specified collection or
0if the collection isnull. - Since:
- 1.2
-
size
-
isEmpty
Deprecated.Use PrincipalCollection.isEmpty() directly.- Parameters:
principals- the principals to check.- Returns:
trueif the specifiedPrincipalCollectionisnullorempty,falseotherwise.- Since:
- 1.0
-
asList
-