org.jcoderz.commons.types
Class JiraState

java.lang.Object
  extended by org.jcoderz.commons.types.JiraState
All Implemented Interfaces:
Serializable, EnumType, StrongType

public final class JiraState
extends Object
implements Serializable, EnumType

Enumerated type of a jira state. Instances of this class are immutable. The following jira states are defined:

The values of this enum have a internal sequential integer representation starting with '0'.

Author:
generated
See Also:
Serialized Form

Field Summary
static JiraState ACCEPTED
          The JiraState Accepted.
static JiraState ASSIGNED
          The JiraState Assigned.
static JiraState CLOSED
          The JiraState Closed.
static JiraState INFO_REQUESTED
          The JiraState InfoRequested.
static JiraState OPENED
          The JiraState Opened.
static JiraState POSTPONED
          The JiraState Postponed.
static JiraState REJECTED
          The JiraState Rejected.
static JiraState RESOLVED
          The JiraState Resolved.
static JiraState SUBMITTED
          The JiraState Submitted.
static String TYPE_NAME
          The name of this type.
static Map VALUE_MAP
          Immutable map using the name string as key holding the JiraStates as values.
static List VALUES
          Immutable list of the JiraStates.
 
Method Summary
static JiraState fromInt(int i)
          Creates a JiraState object from its int representation.
static JiraState fromString(String str)
          Creates a JiraState object from its String representation.
 int toInt()
          Returns the int representation of this jira state.
 String toString()
          Returns the String representation of this jira state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_NAME

public static final String TYPE_NAME
The name of this type.

See Also:
Constant Field Values

SUBMITTED

public static final JiraState SUBMITTED
The JiraState Submitted.


INFO_REQUESTED

public static final JiraState INFO_REQUESTED
The JiraState InfoRequested.


POSTPONED

public static final JiraState POSTPONED
The JiraState Postponed.


ASSIGNED

public static final JiraState ASSIGNED
The JiraState Assigned.


REJECTED

public static final JiraState REJECTED
The JiraState Rejected.


OPENED

public static final JiraState OPENED
The JiraState Opened.


RESOLVED

public static final JiraState RESOLVED
The JiraState Resolved.


ACCEPTED

public static final JiraState ACCEPTED
The JiraState Accepted.


CLOSED

public static final JiraState CLOSED
The JiraState Closed.


VALUES

public static final List VALUES
Immutable list of the JiraStates.


VALUE_MAP

public static final Map VALUE_MAP
Immutable map using the name string as key holding the JiraStates as values.

Method Detail

fromInt

public static JiraState fromInt(int i)
                         throws ArgumentMalformedException
Creates a JiraState object from its int representation.

Parameters:
i - the integer representation of the jira state.
Returns:
the JiraState object represented by this int.
Throws:
ArgumentMalformedException - If the assigned int value isn't listed in the internal jira state table.

fromString

public static JiraState fromString(String str)
                            throws ArgumentMalformedException
Creates a JiraState object from its String representation.

Parameters:
str - the string representation of the jira state.
Returns:
the JiraState object represented by this str.
Throws:
ArgumentMalformedException - If the given str value isn't listed in the internal jira state table.

toInt

public int toInt()
Returns the int representation of this jira state.

Specified by:
toInt in interface EnumType
Returns:
the int representation of this jira state.

toString

public String toString()
Returns the String representation of this jira state.

Overrides:
toString in class Object
Returns:
the String representation of this jira state.


Copyright 2007 The jCoderZ Project.