Serializable
, Comparable<IssueRelation.Type>
, IntCodeEnum<IssueRelation.Type>
public static enum IssueRelation.Type extends Enum<IssueRelation.Type> implements IntCodeEnum<IssueRelation.Type>
Enum Constant | Description |
---|---|
CLONED_C |
Defines a cloned issue.
|
CLONED_P |
Defines a cloned issue.
|
DEPENDENT_C |
Defines a dependent issue.
|
DEPENDENT_P |
Defines a dependent issue.
|
DUPLICATE_C |
Defines a duplicate issue.
|
DUPLICATE_P |
Defines a duplicate issue.
|
RELATED_C |
Defines a related issue.
|
RELATED_P |
Defines a related issue.
|
SPLIT_C |
Defines a split issue.
|
SPLIT_P |
Defines a split issue.
|
DEFAULT_CODE
Modifier and Type | Method | Description |
---|---|---|
IssueRelation.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 |
getLanguageKeyCode() |
Returns the key for a particular issue relation type.
|
static IssueRelation.Type |
valueOf(Integer code) |
Returns the enum constant of this type with the specified name.
|
static IssueRelation.Type |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static IssueRelation.Type[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final IssueRelation.Type RELATED_P
public static final IssueRelation.Type RELATED_C
public static final IssueRelation.Type DUPLICATE_P
public static final IssueRelation.Type DUPLICATE_C
public static final IssueRelation.Type CLONED_P
public static final IssueRelation.Type CLONED_C
public static final IssueRelation.Type SPLIT_P
public static final IssueRelation.Type SPLIT_C
public static final IssueRelation.Type DEPENDENT_P
public static final IssueRelation.Type DEPENDENT_C
public static IssueRelation.Type[] values()
for (IssueRelation.Type c : IssueRelation.Type.values()) System.out.println(c);
public static IssueRelation.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<IssueRelation.Type>
public IssueRelation.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<IssueRelation.Type>
code
- unique enum constant as defined in iTracker 2public static IssueRelation.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 getLanguageKeyCode()
Copyright © 2002–2019 itracker. All rights reserved.