|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.framework.Enum | +--org.apache.avalon.framework.ValuedEnum
Basic enum class for type-safe enums with values. Should be used as an abstract base.
Constructor Summary | |
ValuedEnum(java.lang.String name,
int value)
Constructor for enum. |
|
ValuedEnum(java.lang.String name,
int value,
java.util.Map map)
Constructor for enum so that it gets added to map at creation. |
Method Summary | |
int |
getValue()
Get value of enum. |
boolean |
isEqualTo(ValuedEnum other)
Test if enum is equal in value to other enum. |
boolean |
isGreaterThan(ValuedEnum other)
Test if enum is greater than in value to other enum. |
boolean |
isGreaterThanOrEqual(ValuedEnum other)
Test if enum is greater than or equal in value to other enum. |
boolean |
isLessThan(ValuedEnum other)
Test if enum is less than in value to other enum. |
boolean |
isLessThanOrEqual(ValuedEnum other)
Test if enum is less than or equal in value to other enum. |
java.lang.String |
toString()
Overide toString method to produce human readable description. |
Methods inherited from class org.apache.avalon.framework.Enum |
getName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ValuedEnum(java.lang.String name, int value, java.util.Map map)
name
- the name of enumvalue
- the value of enummap
- the map to add enum topublic ValuedEnum(java.lang.String name, int value)
name
- the name of enumvalue
- the value of enumMethod Detail |
public final int getValue()
public final boolean isEqualTo(ValuedEnum other)
other
- the other enumpublic final boolean isGreaterThan(ValuedEnum other)
other
- the other enumpublic final boolean isGreaterThanOrEqual(ValuedEnum other)
other
- the other enumpublic final boolean isLessThan(ValuedEnum other)
other
- the other enumpublic final boolean isLessThanOrEqual(ValuedEnum other)
other
- the other enumpublic java.lang.String toString()
toString
in class Enum
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |