Class CollectionUtils


  • public final class CollectionUtils
    extends java.lang.Object
    Utility methods for working with collections.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isEmpty​(java.util.Collection<?> collection)
      Returns whether a collection is null or empty.
      static boolean isList​(java.lang.reflect.Field field)
      Checks whether the argument field is a List.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isList

        public static boolean isList​(java.lang.reflect.Field field)
        Checks whether the argument field is a List.
        Parameters:
        field - the field to check the type of
        Returns:
        true if the field is a List, false otherwise
      • isEmpty

        public static boolean isEmpty​(java.util.Collection<?> collection)
        Returns whether a collection is null or empty.
        Parameters:
        collection - the collection to check
        Returns:
        true if the collection is either null or empty, false otherwise