Enum Class EEnabled

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

public enum EEnabled extends Enum<EEnabled> implements IEnabledIndicator
Small enum for setter method to identify whether an object is enabled or not.
Author:
Philip Helger
  • Enum Constant Details

    • ENABLED

      public static final EEnabled ENABLED
    • DISABLED

      public static final EEnabled DISABLED
  • Method Details

    • values

      public static EEnabled[] 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 EEnabled 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
    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface IEnabledIndicator
      Returns:
      true if the object is currently enabled, false otherwise.
    • valueOf

      public static @NonNull EEnabled valueOf(boolean bEnabled)
      Convert a boolean value to the corresponding EEnabled enum value.
      Parameters:
      bEnabled - true for ENABLED, false for DISABLED.
      Returns:
      Never null.
    • valueOf

      public static @NonNull EEnabled valueOf(@NonNull IEnabledIndicator aEnabledIndicator)
      Convert an IEnabledIndicator to the corresponding EEnabled enum value.
      Parameters:
      aEnabledIndicator - The enabled indicator to convert. May not be null.
      Returns:
      Never null.