Class Util

java.lang.Object
ecmwf.common.text.Util

public final class Util extends Object
The Class Util.
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    isEmpty(Options options)
    Checks if the options are empty (null or contains no option).
    static boolean
    isEmpty(String message)
    Checks if the message is empty (null or contains no character).
    static boolean
    isEmpty(Collection<?> collection)
    Checks if the collection is empty (null or contains no element).
    static boolean
    isEmpty(List<?> list)
    Checks if the list is empty (null or contains no element).
    static boolean
    Checks if the options are not empty (not null and contains at least one option).
    static boolean
    isNotEmpty(String message)
    Checks if the message is not empty (not null and contains at least one character).
    static boolean
    isNotEmpty(Collection<?> collection)
    Checks if the collection is not empty (not null and contains at least one element).
    static boolean
    isNotEmpty(List<?> list)
    Checks if the list is not empty (not null and contains at least one element).
    static Object
    If the message is null then translate it to none.

    Methods inherited from class java.lang.Object

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

    • isNotEmpty

      public static boolean isNotEmpty(String message)
      Checks if the message is not empty (not null and contains at least one character).
      Parameters:
      message - the message
      Returns:
      true, if is not empty
    • isNotEmpty

      public static boolean isNotEmpty(Options options)
      Checks if the options are not empty (not null and contains at least one option).
      Parameters:
      options - the options
      Returns:
      true, if is not empty
    • isNotEmpty

      public static boolean isNotEmpty(List<?> list)
      Checks if the list is not empty (not null and contains at least one element).
      Parameters:
      list - the list
      Returns:
      true, if is not empty
    • isNotEmpty

      public static boolean isNotEmpty(Collection<?> collection)
      Checks if the collection is not empty (not null and contains at least one element).
      Parameters:
      collection - the collection
      Returns:
      true, if is not empty
    • isEmpty

      public static boolean isEmpty(String message)
      Checks if the message is empty (null or contains no character).
      Parameters:
      message - the message
      Returns:
      true, if is empty
    • isEmpty

      public static boolean isEmpty(Options options)
      Checks if the options are empty (null or contains no option).
      Parameters:
      options - the options
      Returns:
      true, if is empty
    • isEmpty

      public static boolean isEmpty(List<?> list)
      Checks if the list is empty (null or contains no element).
      Parameters:
      list - the list
      Returns:
      true, if is empty
    • isEmpty

      public static boolean isEmpty(Collection<?> collection)
      Checks if the collection is empty (null or contains no element).
      Parameters:
      collection - the collection
      Returns:
      true, if is empty
    • nullToNone

      public static Object nullToNone(Object object)
      If the message is null then translate it to none.
      Parameters:
      object - the object
      Returns:
      the string