Constructor and Description |
---|
EnumValue(long num,
java.lang.String str,
EnumType type)
For internal use only.
|
Modifier and Type | Method and Description |
---|---|
byte |
byteValue()
Return the numeric value of this enum value as a byte.
|
static EnumValue |
castOptional(DataValue value)
For internal use only.
|
static EnumValue |
castRequired(DataValue value)
For internal use only.
|
static int |
compare(EnumValue x,
EnumValue y)
Compare two wrapped values for ordering.
|
static boolean |
equal(EnumValue x,
EnumValue y)
Compare two wrapped values for equality.
|
Annotation |
getAnnotation(java.lang.String term)
Lookup an existing member annotation by term name.
|
AnnotationList |
getAnnotationList()
List of annotations for this value.
|
AnnotationMap |
getAnnotationMap()
Map of annotations for this value.
|
boolean |
getCanBeRemoved()
Can this model element be removed by
DataService.refreshMetadata . |
DataType |
getDataType()
Data type with a
DataType.code of DataType.ENUM_VALUE. |
EnumType |
getEnumType()
The enum type metadata for this value (
EnumValue.dataType cast to EnumType ). |
java.lang.String |
getName()
Name of this enumeration member.
|
DataValue |
getValue()
The numeric value of this enum value as a ByteValue, ShortValue, IntValue, LongValue, UnsignedByte or UnsignedShort (depending on the enum type's underlying type).
|
int |
intValue()
Return the numeric value of this enum value as an int.
|
boolean |
isExtension()
True if this member was added since metadata was originally loaded.
|
boolean |
isRemoved()
Has this model element been removed by a successful call to
DataService.refreshMetadata ?
If `isRemoved == true, that implies that the old metadata (before refreshMetadata was called) did include this model element,
and that the new metadata (after refreshMetadata was called) does not include this model element. |
long |
longValue()
Return the numeric value of this enum value as a long.
|
void |
setAnnotationList(AnnotationList value)
List of annotations for this value.
|
void |
setAnnotationMap(AnnotationMap value)
Map of annotations for this value.
|
void |
setCanBeRemoved(boolean value)
Can this model element be removed by
DataService.refreshMetadata . |
void |
setExtension(boolean value)
True if this member was added since metadata was originally loaded.
|
void |
setRemoved(boolean value)
Has this model element been removed by a successful call to
DataService.refreshMetadata ?
If `isRemoved == true, that implies that the old metadata (before refreshMetadata was called) did include this model element,
and that the new metadata (after refreshMetadata was called) does not include this model element. |
short |
shortValue()
Return the numeric value of this enum value as a short.
|
java.lang.String |
toString()
Convert this data value to a string.
|
cloneMutable, equals, getTypeCode, hashCode
public EnumValue(long num, java.lang.String str, EnumType type)
For internal use only.
public byte byteValue()
Return the numeric value of this enum value as a byte.
public static int compare(EnumValue x, EnumValue y)
Compare two wrapped values for ordering.
x
- First object for comparison.y
- Second object for comparison.x.value < y.value
, 0 if x.value == y.value
, or 1 if x.value > y.value
.public static boolean equal(EnumValue x, EnumValue y)
Compare two wrapped values for equality.
x
- (nullable) First object for comparison.y
- (nullable) Second object for comparison.true
if x.value == y.value
or if both arguments are null
, otherwise false
.public Annotation getAnnotation(java.lang.String term)
Lookup an existing member annotation by term name.
EnumValue.annotationMap
, for looking up annotations that might not exist.
term
- The term name.public AnnotationList getAnnotationList()
List of annotations for this value.
public AnnotationMap getAnnotationMap()
Map of annotations for this value.
public boolean getCanBeRemoved()
Can this model element be removed by DataService.refreshMetadata
. Defaults to false
.
Set this to true
to indicate that the application is coded to be able able to function correctly without this model element.
public DataType getDataType()
Data type with a DataType.code
of DataType.ENUM_VALUE.
getDataType
in class DataValue
public EnumType getEnumType()
The enum type metadata for this value (EnumValue.dataType
cast to EnumType
).
public java.lang.String getName()
Name of this enumeration member.
public DataValue getValue()
The numeric value of this enum value as a ByteValue, ShortValue, IntValue, LongValue, UnsignedByte or UnsignedShort (depending on the enum type's underlying type).
public int intValue()
Return the numeric value of this enum value as an int.
public boolean isExtension()
True if this member was added since metadata was originally loaded.
public boolean isRemoved()
Has this model element been removed by a successful call to DataService.refreshMetadata
?
If `isRemoved == true, that implies that the old metadata (before refreshMetadata was called) did include this model element,
and that the new metadata (after refreshMetadata was called) does not include this model element.
public long longValue()
Return the numeric value of this enum value as a long.
public void setAnnotationList(AnnotationList value)
List of annotations for this value.
public void setAnnotationMap(AnnotationMap value)
Map of annotations for this value.
public void setCanBeRemoved(boolean value)
Can this model element be removed by DataService.refreshMetadata
. Defaults to false
.
Set this to true
to indicate that the application is coded to be able able to function correctly without this model element.
public void setExtension(boolean value)
True if this member was added since metadata was originally loaded.
public void setRemoved(boolean value)
Has this model element been removed by a successful call to DataService.refreshMetadata
?
If `isRemoved == true, that implies that the old metadata (before refreshMetadata was called) did include this model element,
and that the new metadata (after refreshMetadata was called) does not include this model element.
public short shortValue()
Return the numeric value of this enum value as a short.
public java.lang.String toString()
Convert this data value to a string.
If the EnumValue.dataType
is defined by XML Schema Part 2: Datatypes, then the corresponding lexical format is used.
JSON format is used for structured values (arrays and objects).