Package com.tailf.conf
Class ConfHexString
Object
com.tailf.conf.ConfObject
com.tailf.conf.ConfValue
com.tailf.conf.ConfHexString
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<ConfHexString>
public class ConfHexString
extends ConfValue
implements Cloneable, Serializable, Comparable<ConfHexString>
DATA_CONTAINER - Corresponds to the YANG
hex-string
type.
A string of colon-separated hexa-decimal octets e.g. '4F:4C:41:71'.
A hex-list is defined as:
hex-string { type string { pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'; } }A hexadecimal string with octets represented as hex digits separated by colons. The canonical representation uses lowercase characters.
- See Also:
-
Field Summary
Fields inherited from class com.tailf.conf.ConfObject
J_BINARY, J_BIT32, J_BIT64, J_BITBIG, J_BOOL, J_BUF, J_CDBBEGIN, J_DATE, J_DATETIME, J_DECIMAL64, J_DEFAULT, J_DOUBLE, J_DQUAD, J_DURATION, J_ENUMERATION, J_HEXSTR, J_IDENTITYREF, J_INSTANCE_IDENTIFIER, J_INT16, J_INT32, J_INT64, J_INT8, J_IPV4, J_IPV4_AND_PLEN, J_IPV4PREFIX, J_IPV6, J_IPV6_AND_PLEN, J_IPV6PREFIX, J_LIST, J_NOEXISTS, J_OBJECTREF, J_OID, J_PTR, J_QNAME, J_STR, J_SYMBOL, J_TIME, J_UINT16, J_UINT32, J_UINT64, J_UINT8, J_UNION, J_XMLBEGIN, J_XMLBEGINDEL, J_XMLEND, J_XMLMOVEAFTER, J_XMLMOVEFIRST, J_XMLTAG
-
Constructor Summary
ConstructorDescriptionConfHexString
(byte[] val) Construct aConfHexString
from a byte array.ConfHexString
(ConfBinary obj) Constructs aConfHexString
from aConfBinary
object.ConfHexString
(String str) Construct aConfHexString
from a string of bytes in the format of hexadecimal values separated with colons. -
Method Summary
Methods inherited from class com.tailf.conf.ConfValue
getStringByValue, getStringByValue, getValueByString, getValueByString
Methods inherited from class com.tailf.conf.ConfObject
clone, decode
-
Constructor Details
-
ConfHexString
Construct aConfHexString
from a string of bytes in the format of hexadecimal values separated with colons.- Parameters:
str
- string representation of theConfHexString
- Throws:
ConfException
-
ConfHexString
public ConfHexString(byte[] val) Construct aConfHexString
from a byte array.- Parameters:
val
- byte array representation of theConfHexString
-
ConfHexString
Constructs aConfHexString
from aConfBinary
object.- Parameters:
obj
- aConfBinary
object
-
ConfHexString
- Throws:
ConfException
-
-
Method Details
-
toString
Returns string representation of aConfHexString
.Format a HexString as hexadecimal values separated with colons, as for example: "00:4f:4c:41:ff".
-
equals
Description copied from class:ConfValue
Determine if two ConfValue are equal. In general, ConfObjects are equal if the components they consist of are equal. -
hashCode
public int hashCode()Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided byjava.util.Hashtable
. The hash code is calculated through the list of bytes that thisConfHexString
holds. -
encode
Description copied from class:ConfValue
encode value. -
compareTo
- Specified by:
compareTo
in interfaceComparable<ConfHexString>
-