Package gov.aps.jca
Class ValuedEnum
- java.lang.Object
-
- gov.aps.jca.Enum
-
- gov.aps.jca.ValuedEnum
-
- Direct Known Subclasses:
CASeverity,CAStatus,Channel.ConnectionState,DBRType,Severity,Status
public abstract class ValuedEnum extends Enum
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedValuedEnum(String name, int value)protectedValuedEnum(String name, int value, Map map)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetValue()Get value of enum item.booleanisEqualTo(ValuedEnum other)Test if enum item is equal in value to other enum.booleanisGreaterThan(ValuedEnum other)Test if enum item is greater than in value to other enum.booleanisGreaterThanOrEqual(ValuedEnum other)Test if enum item is greater than or equal in value to other enum.booleanisLessThan(ValuedEnum other)Test if enum item is less than in value to other enum.booleanisLessThanOrEqual(ValuedEnum other)Test if enum item is less than or equal in value to other enum.StringtoString()Override toString method to produce human readable description.
-
-
-
Method Detail
-
getValue
public final int getValue()
Get value of enum item.- Returns:
- the enum item's value.
-
isEqualTo
public final boolean isEqualTo(ValuedEnum other)
Test if enum item is equal in value to other enum.- Parameters:
other- the other enum- Returns:
- true if equal
-
isGreaterThan
public final boolean isGreaterThan(ValuedEnum other)
Test if enum item is greater than in value to other enum.- Parameters:
other- the other enum- Returns:
- true if greater than
-
isGreaterThanOrEqual
public final boolean isGreaterThanOrEqual(ValuedEnum other)
Test if enum item is greater than or equal in value to other enum.- Parameters:
other- the other enum- Returns:
- true if greater than or equal
-
isLessThan
public final boolean isLessThan(ValuedEnum other)
Test if enum item is less than in value to other enum.- Parameters:
other- the other enum- Returns:
- true if less than
-
isLessThanOrEqual
public final boolean isLessThanOrEqual(ValuedEnum other)
Test if enum item is less than or equal in value to other enum.- Parameters:
other- the other enum- Returns:
- true if less than or equal
-
-