public final class DataUnit extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DataUnit.DataUnitType |
| Modifier and Type | Field and Description |
|---|---|
static DataUnit |
COUPON |
static DataUnit |
UNKNOWN |
| Constructor and Description |
|---|
DataUnit(DataUnit.DataUnitType pLiteral)
Initialize object from real enumeration literal
|
DataUnit(String pLiteralName)
Initialize object using the name of the literal.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object pObject)
|
DataUnit.DataUnitType |
getLiteral()
Method returns the literal that is represented by this object.
|
String |
getUnknownLiteralName()
Method returns the actual name of the unknown literal
|
int |
hashCode()
|
boolean |
isUnknownLiteral()
Method checks if the represented literal is actually unknown or not.
|
String |
toString()
|
static DataUnit |
valueOf(String pLiteralName)
Method returns extensible enumeration based on the passed name.
|
public static final DataUnit COUPON
public static final DataUnit UNKNOWN
public DataUnit(DataUnit.DataUnitType pLiteral)
pLiteral - Enumeration literal that should be used to initialize the extensible enumeration. The parameter
must not be null.public DataUnit(String pLiteralName)
pLiteralName - Literal name that should be used to initialize the extensible enumeration. If the parameter is
null or has an unknown literal name then a "unknown" version will be created.isUnknownLiteral()public static DataUnit valueOf(String pLiteralName)
pLiteral - Enumeration literal that should be used to initialize the extensible enumeration. The parameter
must not be null.public DataUnit.DataUnitType getLiteral()
DataUnit Literal that is represented by this object. The method never returns null.public boolean isUnknownLiteral()
public String getUnknownLiteralName()
String Name of the unknown literal or null in case that the literal is known.Copyright © 2023. All rights reserved.