Package com.authlete.common.types
Enum ClaimRuleOperation
- java.lang.Object
-
- java.lang.Enum<ClaimRuleOperation>
-
- com.authlete.common.types.ClaimRuleOperation
-
- All Implemented Interfaces:
Serializable
,Comparable<ClaimRuleOperation>
public enum ClaimRuleOperation extends Enum<ClaimRuleOperation>
The operation that a claim rule will apply to any claims it processes.- Since:
- 2.39
-
-
Enum Constant Summary
Enum Constants Enum Constant Description EQUALS
The rule will pass if the claim is present and its value equals the claim rule's comparison value.PRESENT
The rule will pass if the claim is present and has a value.PROHIBITED
The rule will fail if the claim is present and has a value.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ClaimRuleOperation
getByValue(short value)
Get the enum object with the given numerical value, ornull
if not found.short
getValue()
Get the numerical value for this operation.String
toString()
static ClaimRuleOperation
valueOf(String name)
Returns the enum constant of this type with the specified name.static ClaimRuleOperation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PROHIBITED
public static final ClaimRuleOperation PROHIBITED
The rule will fail if the claim is present and has a value.
-
PRESENT
public static final ClaimRuleOperation PRESENT
The rule will pass if the claim is present and has a value.
-
EQUALS
public static final ClaimRuleOperation EQUALS
The rule will pass if the claim is present and its value equals the claim rule's comparison value.
-
-
Method Detail
-
values
public static ClaimRuleOperation[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ClaimRuleOperation c : ClaimRuleOperation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ClaimRuleOperation 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 nameNullPointerException
- if the argument is null
-
getValue
public short getValue()
Get the numerical value for this operation.- Returns:
- The numerical value for this operation.
- Since:
- 2.39
-
toString
public String toString()
- Overrides:
toString
in classEnum<ClaimRuleOperation>
-
getByValue
public static ClaimRuleOperation getByValue(short value)
Get the enum object with the given numerical value, ornull
if not found.- Parameters:
value
- The numerical value to search for.- Returns:
- The enum object, or
null
if not found. - Since:
- 2.39
-
-