Package org.apache.juneau
Enum Class Enablement
- All Implemented Interfaces:
- Serializable,- Comparable<Enablement>,- Constable
Represents the enablement settings of a feature.
 
See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionFeature is always enabled.Feature is enabled per HTTP request.Feature is disabled.
- 
Method SummaryModifier and TypeMethodDescriptionstatic EnablementfromString(String s) Retrieves this enum using case-insensitive matching.booleanisEnabled(boolean def) Tests for enablement.booleanisOneOf(Enablement... values) Returnstrue if this enum is one of the specified values.static EnablementReturns the enum constant of this class with the specified name.static Enablement[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
ALWAYSFeature is always enabled.
- 
CONDITIONALFeature is enabled per HTTP request.
- 
NEVERFeature is disabled.
 
- 
- 
Method Details- 
valuesReturns 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
 
- 
valueOfReturns 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
 
- 
fromStringRetrieves this enum using case-insensitive matching.- Parameters:
- s- The enum name to resolve.
- Returns:
- The resolved value, or null if no match found.
 
- 
isOneOfReturnstrue 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.
 
- 
isEnabledTests for enablement.- Parameters:
- def- The default value to use if this is- CONDITIONAL.
- Returns:
- true if this is- ALWAYSor- CONDITIONALand- def is- true .
 
 
-