Package com.atlassian.bamboo
Enum KeyType
- java.lang.Object
-
- java.lang.Enum<KeyType>
-
- com.atlassian.bamboo.KeyType
-
- All Implemented Interfaces:
Serializable
,Comparable<KeyType>
public enum KeyType extends Enum<KeyType>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
KeyType.Constants
-
Enum Constant Summary
Enum Constants Enum Constant Description CHAIN
CHAIN_RESULT
DEPLOYMENT
DEPLOYMENT_RESULT
JOB
JOB_RESULT
UNKNOWN
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Key
getKeyFromString(String key)
Get the typed key from its string representationstatic KeyType
getKeyTypeFromString(String key)
Look at the provided key and work out what KeyType it isKey
toKey(String key)
Attempt to create the correct key for this KeyType with the provided keystatic KeyType
valueOf(String name)
Returns the enum constant of this type with the specified name.static KeyType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CHAIN
public static final KeyType CHAIN
-
CHAIN_RESULT
public static final KeyType CHAIN_RESULT
-
DEPLOYMENT
public static final KeyType DEPLOYMENT
-
DEPLOYMENT_RESULT
public static final KeyType DEPLOYMENT_RESULT
-
JOB
public static final KeyType JOB
-
JOB_RESULT
public static final KeyType JOB_RESULT
-
UNKNOWN
public static final KeyType UNKNOWN
-
-
Method Detail
-
values
public static KeyType[] 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 (KeyType c : KeyType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static KeyType 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
-
getKeyTypeFromString
public static KeyType getKeyTypeFromString(String key)
Look at the provided key and work out what KeyType it is- Parameters:
key
- The string representation of a key- Returns:
- The KeyType that matches
-
toKey
public Key toKey(String key)
Attempt to create the correct key for this KeyType with the provided key- Parameters:
key
- The key as a string, e.g. "FOO-BAR"- Returns:
- A typed key for this KeyType
-
-