Package com.optum.sourcehawk.core.utils
Class CollectionUtils
- java.lang.Object
-
- com.optum.sourcehawk.core.utils.CollectionUtils
-
public final class CollectionUtils extends Object
Collection Utilities- Author:
- Brian Wyka
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> booleanisEmpty(Collection<T> collection)Determine if the collection is empty (null or has zero elements)static <T> booleanisNotEmpty(Collection<T> collection)Determine if the collection is NOT empty (has at least one element)
-
-
-
Method Detail
-
isEmpty
public static <T> boolean isEmpty(Collection<T> collection)
Determine if the collection is empty (null or has zero elements)- Type Parameters:
T- the type of the elements in the collection- Parameters:
collection- the collection to check- Returns:
- true if empty, false otherwise
-
isNotEmpty
public static <T> boolean isNotEmpty(Collection<T> collection)
Determine if the collection is NOT empty (has at least one element)- Type Parameters:
T- the type of the elements in the collection- Parameters:
collection- the collection to check- Returns:
- true if NOT empty, false otherwise
-
-