Package com.authlete.common.types
Enum ClaimType
- java.lang.Object
-
- java.lang.Enum<ClaimType>
-
- com.authlete.common.types.ClaimType
-
- All Implemented Interfaces:
Serializable,Comparable<ClaimType>
public enum ClaimType extends Enum<ClaimType>
Claim types.- Author:
- Takahiko Kawasaki
- See Also:
- OpenID Connect Core 1.0, 5.6. Claim Types
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AGGREGATED"aggregated"(2).DISTRIBUTED"distributed"(3).NORMAL"normal"(1).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ClaimTypegetByValue(short value)Find an instance of this enum by a value.shortgetValue()Get the integer representation of this enum instance.static ClaimTypeparse(String claimType)ConvertStringtoClaimType.static ClaimType[]toArray(int bits)static inttoBits(EnumSet<ClaimType> set)static EnumSet<ClaimType>toSet(int bits)static EnumSet<ClaimType>toSet(ClaimType[] array)StringtoString()static ClaimTypevalueOf(String name)Returns the enum constant of this type with the specified name.static ClaimType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NORMAL
public static final ClaimType NORMAL
"normal"(1).Claims that are directly asserted by the OpenID Provider.
-
AGGREGATED
public static final ClaimType AGGREGATED
"aggregated"(2).Claims that are asserted by a Claims Provider other than the OpenID Provider but are returned by OpenID Provider.
-
DISTRIBUTED
public static final ClaimType DISTRIBUTED
"distributed"(3).Claims that are asserted by a Claims Provider other than the OpenID Provider but are returned as references by the OpenID Provider.
-
-
Method Detail
-
values
public static ClaimType[] 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 (ClaimType c : ClaimType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ClaimType 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 integer representation of this enum instance.
-
getByValue
public static ClaimType getByValue(short value)
Find an instance of this enum by a value.- Parameters:
value- The integer representation of the instance to find.- Returns:
- An instance of this enum, or
nullif not found.
-
parse
public static ClaimType parse(String claimType)
ConvertStringtoClaimType.- Parameters:
claimType- A claim type. For example,"normal".- Returns:
ClaimTypeinstance, ornull.
-
toArray
public static ClaimType[] toArray(int bits)
-
-