Serializable
, Comparable<Configuration.Type>
, IntCodeEnum<Configuration.Type>
public static enum Configuration.Type extends Enum<Configuration.Type> implements IntCodeEnum<Configuration.Type>
Enum Constant | Description |
---|---|
customfield |
|
initialized |
|
locale |
|
resolution |
|
severity |
|
status |
DEFAULT_CODE
Modifier and Type | Method | Description |
---|---|---|
Configuration.Type |
fromCode(Integer code) |
Returns a java.lang.Enum constant matching the given integer value.
|
Integer |
getCode() |
Returns the integer value representing this enum constant.
|
String |
getLanguageKey(Configuration configuration) |
Returns the key for a particular configuration item.
|
Integer |
getLegacyCode() |
|
String |
getTypeLanguageKey() |
|
static Configuration.Type |
valueOf(Integer code) |
Returns the enum constant of this type with the specified name.
|
static Configuration.Type |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static Configuration.Type[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Configuration.Type initialized
public static final Configuration.Type locale
public static final Configuration.Type status
public static final Configuration.Type severity
public static final Configuration.Type resolution
public static final Configuration.Type customfield
public static Configuration.Type[] values()
for (Configuration.Type c : Configuration.Type.values()) System.out.println(c);
public static Configuration.Type valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic Integer getCode()
IntCodeEnum
getCode
in interface IntCodeEnum<Configuration.Type>
public Configuration.Type fromCode(Integer code)
IntCodeEnum
This method should actually be static, so that we don't need
an enum constant instance to lookup another instance by code.
However Java interfaces don't allow static methods and Java 5 enums
must inherit java.lang.Enum directly. So there's no way to create
a common base class with a static fromCode(int) method
for all enums in our application for EnumCodeUserType to use
in a type-safe way!
You should instead implement a static valueOf(int) wrapped by this method:
static final E valueOf(Integer code) { for (E val: values()) { if (val.code == code) { return val; } } throw new IllegalArgumentException("Unknown code : " + code); }
fromCode
in interface IntCodeEnum<Configuration.Type>
code
- unique enum constant as defined in iTracker 2public Integer getLegacyCode()
public static Configuration.Type valueOf(Integer code)
code
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getLanguageKey(Configuration configuration)
configuration
- the Configuration to return the key forpublic String getTypeLanguageKey()
Copyright © 2002–2019 itracker. All rights reserved.