Class CollectionUtils

java.lang.Object
com.mebigfatguy.fbcontrib.utils.CollectionUtils

public final class CollectionUtils extends 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
     
    private static org.apache.bcel.classfile.JavaClass
     
    private static org.apache.bcel.classfile.JavaClass
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    private to reinforce the helper status of the class
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
     
    static boolean
    isEmpty(Map<?,?> m)
     
    static <T> boolean
    isEmpty(T... a)
     
    static boolean
    determines if the current class name is derived from List, Set or Map

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LIST_CLASS

      private static org.apache.bcel.classfile.JavaClass LIST_CLASS
    • SET_CLASS

      private static org.apache.bcel.classfile.JavaClass SET_CLASS
    • MAP_CLASS

      private static org.apache.bcel.classfile.JavaClass MAP_CLASS
  • Constructor Details

    • CollectionUtils

      private CollectionUtils()
      private to reinforce the helper status of the class
  • Method Details

    • isListSetMap

      public static boolean isListSetMap(String clsName) throws 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:
      ClassNotFoundException - if the cls parameter can't be found
    • isEmpty

      public static boolean isEmpty(Collection<?> c)
    • isEmpty

      public static boolean isEmpty(Map<?,?> m)
    • isEmpty

      @SafeVarargs public static <T> boolean isEmpty(T... a)