Package com.tailf.conf
Class ConfValue
Object
com.tailf.conf.ConfObject
com.tailf.conf.ConfValue
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
ConfAttributeValue
,ConfBinary
,ConfBits
,ConfBool
,ConfBuf
,ConfDate
,ConfDatetime
,ConfDefault
,ConfDottedQuad
,ConfDouble
,ConfDuration
,ConfEnumeration
,ConfFloat
,ConfHexString
,ConfIdentityRef
,ConfInt32
,ConfInt64
,ConfIP
,ConfIPAndPrefixLen
,ConfIPPrefix
,ConfList
,ConfNoExists
,ConfObjectRef
,ConfOID
,ConfQname
,ConfTime
,ConfUInt32
,ConfUInt64
,ConfXMLTagH
Base class of the DATA_CONTAINER
Conf<datatype>
classes.
This class is used to represent an arbitrary Conf value.- 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
-
Method Summary
Modifier and TypeMethodDescriptionabstract ConfEObject
encode()
encode value.abstract boolean
Determine if two ConfValue are equal.static String
getStringByValue
(ConfPath path, ConfValue val) Get the string representation of a ConfValue at a given position in the schema.static String
getStringByValue
(String path, ConfValue val) Get the string representation of a ConfValue at a given position in the schema.static ConfValue
getValueByString
(ConfPath path, String str) Get a ConfValue representation a string at a given position in the schema.static ConfValue
getValueByString
(String path, String str) Get a ConfValue representation a string at a given position in the schema.abstract int
hashCode()
abstract String
toString()
Methods inherited from class com.tailf.conf.ConfObject
clone, decode
-
Constructor Details
-
ConfValue
public ConfValue()
-
-
Method Details
-
toString
- Specified by:
toString
in classConfObject
- Returns:
- the printable representation of the object.
-
equals
Determine if two ConfValue are equal. In general, ConfObjects are equal if the components they consist of are equal.- Specified by:
equals
in classConfObject
- Parameters:
o
- The object to compare to.- Returns:
- true if the objects are identical.
-
hashCode
public abstract int hashCode()- Specified by:
hashCode
in classConfObject
-
encode
encode value.- Specified by:
encode
in classConfObject
-
getStringByValue
Get the string representation of a ConfValue at a given position in the schema. The given path must be absolute and fully qualified with schema prefixes. Note, this method relies on Maapi.loadSchemas() being called prior to this call.- Parameters:
path
- ConfPath representing the absolute schema path to the elementval
- ConfValue subclass representing the value- Returns:
- String representation of the value
- Throws:
ConfException
-
getStringByValue
Get the string representation of a ConfValue at a given position in the schema. The given path must be absolute and fully qualified with schema prefixes. Note, this method relies on Maapi.loadSchemas() being called prior to this call.- Parameters:
path
- String representing the absolute schema path to the elementval
- ConfValue subclass representing the value- Returns:
- String representation of the value
- Throws:
ConfException
-
getValueByString
Get a ConfValue representation a string at a given position in the schema. The given path must be absolute and fully qualified with schema prefixes. Note, this method relies on Maapi.loadSchemas() being called prior to this call.- Parameters:
path
- ConfPath representing the absolute schema path to the elementstr
- String representation of the value- Returns:
- ConfValue the value for the element
- Throws:
ConfException
-
getValueByString
Get a ConfValue representation a string at a given position in the schema. The given path must be absolute and fully qualified with schema prefixes. Note, this method relies on Maapi.loadSchemas() being called prior to this call.- Parameters:
path
- String representing the absolute schema path to the elementstr
- String representation of the value- Returns:
- String representation of the value
- Throws:
ConfException
-