Enum Class Preconditions

java.lang.Object
java.lang.Enum<Preconditions>
com.linkedin.alpini.base.misc.Preconditions
All Implemented Interfaces:
Serializable, Comparable<Preconditions>, Constable

public enum Preconditions extends Enum<Preconditions>
Utility methods for precondition checks.
  • Enum Constant Details

  • Method Details

    • values

      public static Preconditions[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Preconditions valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isNullOrEmpty

      public static boolean isNullOrEmpty(String text)
    • requireNotEmpty

      public static String requireNotEmpty(String text)
    • requireNotEmpty

      public static String requireNotEmpty(String text, String message)
    • checkState

      public static void checkState(boolean state)
    • checkState

      public static void checkState(boolean state, String message)
    • notLessThan

      public static int notLessThan(int value, int level, String message)
    • notLessThan

      public static long notLessThan(long value, long level, String message)
    • between

      public static int between(int value, String name, int min, int max)