public class YangBoolean
extends java.lang.Object
| 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 |
|---|
YangBoolean(boolean b)
Creates a YangBoolean object from a boolean.
|
YangBoolean(java.lang.String s)
Creates a YangBoolean object from a String.
|
| 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()
Nop method provided because this class extends the YangBaseType class.
|
com.tailf.jnc.YangBaseType<T> |
clone()
Clones this object and its value.
|
protected YangBoolean |
cloneShallow()
Clones this object without cloning its value.
|
boolean |
equals(java.lang.Object obj)
Compares this object with another object for equality.
|
protected java.lang.Boolean |
fromString(java.lang.String s)
Works much like Boolean.parseBoolean, except that case matters, s is
trimmed with wsCollapse prior to parsing, and an exception is thrown if
the trimmed string is neither "true" nor "false".
|
T |
getValue() |
int |
hashCode() |
void |
setValue(java.lang.String s)
Sets the value of this object using a String.
|
void |
setValue(T value)
Sets the value of this object using a value of type T.
|
java.lang.String |
toString() |
protected T value
public YangBoolean(java.lang.String s)
throws YangException
s - The string.YangException - If value is not one of "true" or "false".public YangBoolean(boolean b)
throws YangException
b - The boolean to set the value of the new YangBoolean to.YangException - Never.protected java.lang.Boolean fromString(java.lang.String s)
throws YangException
s - The String.YangException - if s does not match a valid boolean valuepublic void check()
throws YangException
check in interface YangType<java.lang.Boolean>YangException - If the value of this object is null.public boolean canEqual(java.lang.Object obj)
obj - Object to compare type with.protected YangBoolean cloneShallow() throws YangException
YangExceptionpublic void setValue(java.lang.String s)
throws YangException
YangTypesetValue in interface YangType<T>s - A string containing the new value to set.YangException - If an invariant was broken during assignment, or
if value could not be parsed from s.public void setValue(T value)
throws YangException
YangTypesetValue in interface YangType<T>value - The new value to set.YangException - If an invariant was broken during assignment.public T getValue()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - The object to compare with.public int hashCode()
hashCode in class java.lang.Object