Enum Enablement

java.lang.Object
java.lang.Enum<Enablement>
org.apache.juneau.Enablement
All Implemented Interfaces:
Serializable, Comparable<Enablement>, java.lang.constant.Constable

public enum Enablement extends Enum<Enablement>
Represents the enablement settings of a feature.
See Also:
  • Enum Constant Details

  • Method Details

    • values

      public static Enablement[] 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 Enablement 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
    • fromString

      public static Enablement fromString(String s)
      Retrieves this enum using case-insensitive matching.
      Parameters:
      s - The enum name to resolve.
      Returns:
      The resolved value, or null if no match found.
    • isOneOf

      public boolean isOneOf(Enablement... values)
      Returns true if this enum is one of the specified values.
      Parameters:
      values - The values to check against.
      Returns:
      true if this enum is one of the specified values.
    • isEnabled

      public boolean isEnabled(boolean def)
      Tests for enablement.
      Parameters:
      def - The default value to use if this is CONDITIONAL.
      Returns:
      true if this is ALWAYS or CONDITIONAL and def is true.