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>
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_EMPTY, 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
ConstructorsConstructorDescriptionConfHexString(byte[] val) Construct aConfHexStringfrom a byte array.ConfHexString(ConfBinary obj) Constructs aConfHexStringfrom aConfBinaryobject.ConfHexString(String str) Construct aConfHexStringfrom 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, getValueByStringMethods inherited from class com.tailf.conf.ConfObject
clone, decode, decode, decode
-
Constructor Details
-
ConfHexString
Construct aConfHexStringfrom 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 aConfHexStringfrom a byte array.- Parameters:
val- byte array representation of theConfHexString
-
ConfHexString
Constructs aConfHexStringfrom aConfBinaryobject.- Parameters:
obj- aConfBinaryobject
-
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:ConfValueDetermine 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 thisConfHexStringholds. -
encode
Description copied from class:ConfValueencode value. -
compareTo
- Specified by:
compareToin interfaceComparable<ConfHexString>
-