|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jcoderz.commons.types.TaggedColor
public final class TaggedColor
Enumerated type of a tagged color. Instances of this class are immutable. The following tagged colors are defined:
| Field Summary | |
|---|---|
static TaggedColor |
BLUE
The TaggedColor blue. |
static TaggedColor |
RED
The TaggedColor red. |
static String |
TYPE_NAME
The name of this type. |
static Map |
VALUE_MAP
Immutable map using the name string as key holding the TaggedColors as values. |
static List |
VALUES
Immutable list of the TaggedColors. |
static TaggedColor |
YELLOW
The TaggedColor yellow. |
| Method Summary | |
|---|---|
static TaggedColor |
fromInt(int i)
Creates a TaggedColor object from its int representation. |
static TaggedColor |
fromString(String str)
Creates a TaggedColor object from its String representation. |
int |
toInt()
Returns the int representation of this tagged color. |
String |
toString()
Returns the String representation of this tagged color. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String TYPE_NAME
public static final TaggedColor BLUE
public static final TaggedColor RED
public static final TaggedColor YELLOW
public static final List VALUES
public static final Map VALUE_MAP
| Method Detail |
|---|
public static TaggedColor fromInt(int i)
throws ArgumentMalformedException
i - the integer representation of the tagged color.
ArgumentMalformedException - If the assigned int value isn't
listed in the internal tagged color table.
public static TaggedColor fromString(String str)
throws ArgumentMalformedException
str - the string representation of the
tagged color.
ArgumentMalformedException - If the given str value isn't
listed in the internal tagged color table.public int toInt()
toInt in interface EnumTypepublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||