Enum EEnabled

java.lang.Object
java.lang.Enum<EEnabled>
com.helger.commons.state.EEnabled
All Implemented Interfaces:
IEnabledIndicator, Serializable, Comparable<EEnabled>, java.lang.constant.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 type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static EEnabled valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type 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

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

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