public abstract class Enum
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
Enum(java.lang.String name,
java.util.Map enumMap)
A constructor for the enumeration.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object object)
Returns
true if the supplied object is equal to this object. |
protected static Enum |
getEnum(java.lang.String name,
java.util.Map enumMap)
Returns the Enum with the supplied name or
null
if no such enum exists. |
java.lang.String |
getName()
Returns the name of the enumeration.
|
int |
hashCode()
Returns the hash code for this object.
|
boolean |
isUnknown()
Returns
true if this enumeration value represents an unknown
or undefined object or false otherwise. |
protected static void |
putEnum(java.lang.String name,
Enum enumValue,
java.util.Map enumMap)
Puts the supplied enum in the map.
|
java.lang.String |
toString()
Returns the name of the enumeration.
|
protected Enum(java.lang.String name,
java.util.Map enumMap)
name - the enum nameenumMap - the map of enumeration valuesprotected static void putEnum(java.lang.String name,
Enum enumValue,
java.util.Map enumMap)
name - the enum nameenumValue - the value to be addedenumMap - the map containing the existing enum valuesjava.lang.IllegalArgumentException - if the map already contains
an entry with the specified nameprotected static Enum getEnum(java.lang.String name, java.util.Map enumMap)
null
if no such enum exists.name - enumMap - nullpublic java.lang.String getName()
toString().toString()public java.lang.String toString()
getName().toString in class java.lang.ObjectgetName()public boolean equals(java.lang.Object object)
true if the supplied object is equal to this object.equals in class java.lang.Objectobject - the other objecttrue if the supplied object is equal to this objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean isUnknown()
true if this enumeration value represents an unknown
or undefined object or false otherwise. An enumeration may
contain at most one value that represents an unknown or undefined value.true if this enumeration value represents an unknown
objectCopyright © 2014 Integral Solutions Ltd. All Rights Reserved.