public class YangEnumeration extends YangBaseString
An enumeration checker method is provided.
| Modifier and Type | Field and Description |
|---|---|
protected T |
value
The value of this object, of which this class is a wrapper for.
|
| Constructor and Description |
|---|
YangEnumeration(java.lang.String value,
java.lang.String[] enums)
Creates an YangEnumeration object given an enum (as a String) and an
array of the allowed enum names.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canEqual(java.lang.Object obj)
Compares type of obj with this object to see if they can be equal.
|
void |
check()
Checks that the value of this object is not null.
|
com.tailf.jnc.YangBaseType<T> |
clone()
Clones this object and its value.
|
protected YangEnumeration |
cloneShallow()
Clones this object without cloning its value.
|
protected java.lang.String[] |
enums()
Get the allowed type names for this enumeration.
|
boolean |
equals(java.lang.Object obj)
Compares this enumeration with another object for equality.
|
T |
getValue() |
int |
hashCode() |
java.lang.String |
toString() |
exact, fromString, max, min, pattern, pattern, setValue, wsCollapse, wsReplaceprotected T value
public YangEnumeration(java.lang.String value,
java.lang.String[] enums)
throws YangException
value - The enum nameenums - The allowed type names of the enumeration.YangException - If an invariant was broken during assignment.protected java.lang.String[] enums()
public void check()
throws YangException
YangTypecheck in interface YangType<java.lang.String>YangException - If the value of this object is null.public boolean canEqual(java.lang.Object obj)
canEqual in interface YangType<java.lang.String>canEqual in class YangBaseStringobj - Object to compare type with.public boolean equals(java.lang.Object obj)
obj - The object to compare with.public int hashCode()
protected YangEnumeration cloneShallow() throws YangException
cloneShallow in class YangBaseStringYangExceptionpublic T getValue()
public java.lang.String toString()
toString in class java.lang.Object