Class Util


  • public final class Util
    extends Object
    Misc. utilities.
    • Method Detail

      • nullOrEmpty

        public static boolean nullOrEmpty​(String string)
        Returns true if the given string is null or empty.
        Parameters:
        string - the string to check
        Returns:
        true if the given string is null or empty, false otherwise
      • nullOrEmpty

        public static boolean nullOrEmpty​(String... strings)
        Returns true if any of the given strings is null or empty.
        Parameters:
        strings - the strings to check
        Returns:
        true if one of the given strings is null or empty or if no arguments are provided, false otherwise
      • nullOrEmpty

        public static boolean nullOrEmpty​(Map<?,​?> map)
        Returns true if the given map is null or empty.
        Parameters:
        map - the map to check
        Returns:
        true if the given map is null or empty, false otherwise
      • nullOrEmpty

        public static boolean nullOrEmpty​(Collection<?> collection)
        Returns true if the given collection is null or empty.
        Parameters:
        collection - the collection to check
        Returns:
        true if the given collection is null or empty, false otherwise
      • notNull

        public static boolean notNull​(Object... objects)
        Checks if any of the given objects is null
        Parameters:
        objects - the objects to check
        Returns:
        true if none of the given objects is null