Package com.mebigfatguy.fbcontrib.utils
Class CollectionUtils
- java.lang.Object
-
- com.mebigfatguy.fbcontrib.utils.CollectionUtils
-
public final class CollectionUtils extends java.lang.Object
a collection of static methods for determining if a class belongs to one or more collection types.
-
-
Field Summary
Fields Modifier and Type Field Description private static org.apache.bcel.classfile.JavaClass
LIST_CLASS
private static org.apache.bcel.classfile.JavaClass
MAP_CLASS
private static org.apache.bcel.classfile.JavaClass
SET_CLASS
-
Constructor Summary
Constructors Modifier Constructor Description private
CollectionUtils()
private to reinforce the helper status of the class
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isEmpty(java.util.Collection<?> c)
static boolean
isEmpty(java.util.Map<?,?> m)
static <T> boolean
isEmpty(T... a)
static boolean
isListSetMap(java.lang.String clsName)
determines if the current class name is derived from List, Set or Map
-
-
-
Method Detail
-
isListSetMap
public static boolean isListSetMap(java.lang.String clsName) throws java.lang.ClassNotFoundException
determines if the current class name is derived from List, Set or Map- Parameters:
clsName
- the class to determine it's parentage- Returns:
- if the class is a List, Set or Map
- Throws:
java.lang.ClassNotFoundException
- if the cls parameter can't be found
-
isEmpty
public static boolean isEmpty(java.util.Collection<?> c)
-
isEmpty
public static boolean isEmpty(java.util.Map<?,?> m)
-
isEmpty
@SafeVarargs public static <T> boolean isEmpty(T... a)
-
-