|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<Status>
org.itracker.model.Status
public enum Status
Enumeration of Project, Component or Version statuses.
| Enum Constant Summary | |
|---|---|
ACTIVE
|
|
DELETED
|
|
LOCKED
|
|
VIEWABLE
|
|
| Field Summary |
|---|
| Fields inherited from interface org.itracker.model.IntCodeEnum |
|---|
DEFAULT_CODE |
| Method Summary | |
|---|---|
Status |
fromCode(int code)
Returns a java.lang.Enum constant matching the given integer value. |
int |
getCode()
Returns the integer value representing this enum constant. |
static Status |
valueOf(int code)
|
static Status |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static Status[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final Status DELETED
public static final Status ACTIVE
public static final Status VIEWABLE
public static final Status LOCKED
| Method Detail |
|---|
public static Status[] values()
for (Status c : Status.values()) System.out.println(c);
public static Status valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullpublic int getCode()
IntCodeEnum
getCode in interface IntCodeEnum<Status>public Status fromCode(int code)
IntCodeEnumThis 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!
fromCode in interface IntCodeEnum<Status>code - unique enum constant as defined in iTracker 2
public static Status valueOf(int code)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||