Serializable
, Comparable<IssueActivityType>
, IntCodeEnum<IssueActivityType>
public enum IssueActivityType extends Enum<IssueActivityType> implements IntCodeEnum<IssueActivityType>
DEFAULT_CODE
Modifier and Type | Method | Description |
---|---|---|
static IssueActivityType |
forCode(Integer type) |
Deprecated.
|
IssueActivityType |
fromCode(Integer code) |
Returns a java.lang.Enum constant matching the given integer value.
|
Integer |
getCode() |
Returns the integer value representing this enum constant.
|
static IssueActivityType |
valueOf(Integer type) |
Returns the enum constant of this type with the specified name.
|
static IssueActivityType |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static IssueActivityType[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final IssueActivityType ISSUE_CREATED
public static final IssueActivityType STATUS_CHANGE
public static final IssueActivityType OWNER_CHANGE
public static final IssueActivityType SEVERITY_CHANGE
public static final IssueActivityType COMPONENTS_MODIFIED
public static final IssueActivityType VERSIONS_MODIFIED
public static final IssueActivityType REMOVE_HISTORY
public static final IssueActivityType ISSUE_MOVE
public static final IssueActivityType SYSTEM_UPDATE
public static final IssueActivityType TARGETVERSION_CHANGE
public static final IssueActivityType DESCRIPTION_CHANGE
public static final IssueActivityType RESOLUTION_CHANGE
public static final IssueActivityType RELATION_ADDED
public static final IssueActivityType RELATION_REMOVED
public static final IssueActivityType ATTACHMENT_ADDED
public static IssueActivityType[] values()
for (IssueActivityType c : IssueActivityType.values()) System.out.println(c);
public static IssueActivityType 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 static final IssueActivityType forCode(Integer type)
public static final IssueActivityType valueOf(Integer type)
type
- 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 IssueActivityType 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<IssueActivityType>
code
- unique enum constant as defined in iTracker 2public Integer getCode()
IntCodeEnum
getCode
in interface IntCodeEnum<IssueActivityType>
Copyright © 2002–2019 itracker. All rights reserved.