public final class ExtensibleEnum extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ExtensibleEnum.ExtensibleEnumType |
| Modifier and Type | Field and Description |
|---|---|
static ExtensibleEnum |
BLUE |
static ExtensibleEnum |
GREEN |
static ExtensibleEnum |
RED |
| Constructor and Description |
|---|
ExtensibleEnum(ExtensibleEnum.ExtensibleEnumType pLiteral)
Initialize object from real enumeration literal
|
ExtensibleEnum(String pLiteralName)
Initialize object using the name of the literal.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object pObject)
|
ExtensibleEnum.ExtensibleEnumType |
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 ExtensibleEnum |
valueOf(String pLiteralName)
Method returns extensible enumeration based on the passed name.
|
public static final ExtensibleEnum RED
public static final ExtensibleEnum GREEN
public static final ExtensibleEnum BLUE
public ExtensibleEnum(ExtensibleEnum.ExtensibleEnumType pLiteral)
pLiteral - Enumeration literal that should be used to initialize the extensible enumeration. The parameter
must not be null.public ExtensibleEnum(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 ExtensibleEnum valueOf(String pLiteralName)
pLiteral - Enumeration literal that should be used to initialize the extensible enumeration. The parameter
must not be null.public ExtensibleEnum.ExtensibleEnumType getLiteral()
ExtensibleEnum 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 © 2022. All rights reserved.