Class EnumRecord
- java.lang.Object
-
- com.smartgridready.communicator.common.api.values.EnumRecord
-
public class EnumRecord extends java.lang.ObjectImplements a custom enumeration record.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringUNDEFINED_LITERALPlaceholder for undefined literals.static longUNDEFINED_ORDINALPlaceholder for undefined ordinal.
-
Constructor Summary
Constructors Constructor Description EnumRecord(java.lang.String literal, java.lang.Long ordinal, java.lang.String description)Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetDescription()Gets the record description.java.lang.StringgetLiteral()Gets the text literal.java.lang.LonggetOrdinal()Gets the numeric ordinal.inthashCode()java.lang.StringtoString()
-
-
-
Field Detail
-
UNDEFINED_LITERAL
public static final java.lang.String UNDEFINED_LITERAL
Placeholder for undefined literals.- See Also:
- Constant Field Values
-
UNDEFINED_ORDINAL
public static final long UNDEFINED_ORDINAL
Placeholder for undefined ordinal.- See Also:
- Constant Field Values
-
-
Method Detail
-
getLiteral
public java.lang.String getLiteral()
Gets the text literal.- Returns:
- a string
-
getOrdinal
public java.lang.Long getOrdinal()
Gets the numeric ordinal.- Returns:
- an integer
-
getDescription
public java.lang.String getDescription()
Gets the record description.- Returns:
- a string
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-