Enum AllocationToken.TokenStatus
- java.lang.Object
-
- java.lang.Enum<AllocationToken.TokenStatus>
-
- google.registry.model.domain.token.AllocationToken.TokenStatus
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AllocationToken.TokenStatus>
- Enclosing class:
- AllocationToken
public static enum AllocationToken.TokenStatus extends java.lang.Enum<AllocationToken.TokenStatus>
The status of this token with regard to any potential promotion.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CANCELLED
The promotion was manually invalidated.ENDED
The promotion has ended.NOT_STARTED
Default status for a token.VALID
A promotion is currently running.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AllocationToken.TokenStatus
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static AllocationToken.TokenStatus[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NOT_STARTED
public static final AllocationToken.TokenStatus NOT_STARTED
Default status for a token. Either a promotion doesn't exist or it hasn't started.
-
VALID
public static final AllocationToken.TokenStatus VALID
A promotion is currently running.
-
ENDED
public static final AllocationToken.TokenStatus ENDED
The promotion has ended.
-
CANCELLED
public static final AllocationToken.TokenStatus CANCELLED
The promotion was manually invalidated.
-
-
Method Detail
-
values
public static AllocationToken.TokenStatus[] 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 (AllocationToken.TokenStatus c : AllocationToken.TokenStatus.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AllocationToken.TokenStatus valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-