Enum Class EValidity

java.lang.Object
java.lang.Enum<EValidity>
com.helger.base.state.EValidity
All Implemented Interfaces:
IValidityIndicator, Serializable, Comparable<EValidity>, Constable

public enum EValidity extends Enum<EValidity> implements IValidityIndicator
Small enum for checks to indicate valid or invalid.
Author:
Philip Helger
  • Enum Constant Details

    • VALID

      public static final EValidity VALID
    • INVALID

      public static final EValidity INVALID
  • Method Details

    • values

      public static EValidity[] 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 EValidity 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
    • isValid

      public boolean isValid()
      Specified by:
      isValid in interface IValidityIndicator
      Returns:
      true if valid and false if invalid.
    • valueOf

      public static @NonNull EValidity valueOf(boolean bValidity)
      Convert a boolean value to the corresponding EValidity enum value.
      Parameters:
      bValidity - true for VALID, false for INVALID.
      Returns:
      Never null.
    • valueOf

      public static @NonNull EValidity valueOf(@NonNull IValidityIndicator aValidityIndicator)
      Convert an IValidityIndicator to the corresponding EValidity enum value.
      Parameters:
      aValidityIndicator - The validity indicator to convert. May not be null.
      Returns:
      Never null.