Package com.tailf.conf
Class ConfHexList
Object
com.tailf.conf.ConfObject
com.tailf.conf.ConfValue
com.tailf.conf.ConfBinary
com.tailf.conf.ConfHexList
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<ConfBinary>
DATA_CONTAINER - Corresponds to the YANG
tailf:hex-list
type.
A list of colon-separated hexa-decimal octets e.g. '4F:4C:41:71'.
A hex-list is defined as:
typedef hex-list { type string { pattern '(([0-9a-fA-F]){2}(:([0-9a-fA-F]){2})*)?'; } }
When a instance of this type is encoded and send over the
socket through MAAPI or CDB with the
Maapi.setElem(int,com.tailf.conf.ConfObject, com.tailf.conf.ConfPath)
,
CdbSession.setElem(com.tailf.conf.ConfValue, com.tailf.conf.ConfPath)
method
it will encode this value as a ConfBinary
which has the
effect that the corresponding getElem
from MAAPI and CDB
will return a ConfBinary
instead of a ConfHexList
.
- 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
ConstructorDescriptionConfHexList
(byte[] val) Construct aConfHexList
from a byte array.ConfHexList
(ConfBinary obj) Constructs aConfHexList
from aConfBinary
object.ConfHexList
(String str) Construct aConfHexList
from a string of bytes in the format of hexadecimal values separated with colons. -
Method Summary
Methods inherited from class com.tailf.conf.ConfBinary
bytesValue, compareTo, encode, setCSType, toHexListString, toOctetListString
Methods inherited from class com.tailf.conf.ConfValue
getStringByValue, getStringByValue, getValueByString, getValueByString
Methods inherited from class com.tailf.conf.ConfObject
clone, decode
-
Constructor Details
-
ConfHexList
Construct aConfHexList
from a string of bytes in the format of hexadecimal values separated with colons.- Parameters:
str
- string representation of theConfHexList
- Throws:
ConfException
-
ConfHexList
public ConfHexList(byte[] val) Construct aConfHexList
from a byte array.- Parameters:
val
- byte array representation of theConfHexList
-
ConfHexList
Constructs aConfHexList
from aConfBinary
object.- Parameters:
obj
- aConfBinary
object
-
-
Method Details
-
toString
Returns string representation of aConfHexList
.Format a hexList as hexadecimal values separated with colons, as for example: "00:4f:4c:41:ff".
- Overrides:
toString
in classConfBinary
- Returns:
- a string representation of this
ConfHexList
-
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.- Overrides:
equals
in classConfBinary
- Parameters:
o
- The object to compare to.- Returns:
- true if the objects are identical.
-
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 thisConfHexList
holds.- Overrides:
hashCode
in classConfBinary
- Returns:
- a hash code value for this object.
-