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

public abstract class ConfValue extends ConfObject implements Cloneable, Serializable
Base class of the DATA_CONTAINER Conf<datatype> classes. This class is used to represent an arbitrary Conf value.
See Also:
  • Constructor Details

    • ConfValue

      public ConfValue()
  • Method Details

    • toString

      public abstract String toString()
      Specified by:
      toString in class ConfObject
      Returns:
      the printable representation of the object.
    • equals

      public abstract boolean equals(Object o)
      Determine if two ConfValue are equal. In general, ConfObjects are equal if the components they consist of are equal.
      Specified by:
      equals in class ConfObject
      Parameters:
      o - The object to compare to.
      Returns:
      true if the objects are identical.
    • hashCode

      public abstract int hashCode()
      Specified by:
      hashCode in class ConfObject
    • encode

      public abstract ConfEObject encode()
      encode value.
      Specified by:
      encode in class ConfObject
    • getStringByValue

      public static String getStringByValue(ConfPath path, ConfValue val) throws ConfException
      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 element
      val - ConfValue subclass representing the value
      Returns:
      String representation of the value
      Throws:
      ConfException
    • getStringByValue

      public static String getStringByValue(String path, ConfValue val) throws ConfException
      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 element
      val - ConfValue subclass representing the value
      Returns:
      String representation of the value
      Throws:
      ConfException
    • getValueByString

      public static ConfValue getValueByString(ConfPath path, String str) throws ConfException
      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 element
      str - String representation of the value
      Returns:
      ConfValue the value for the element
      Throws:
      ConfException
    • getValueByString

      public static ConfValue getValueByString(String path, String str) throws ConfException
      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 element
      str - String representation of the value
      Returns:
      String representation of the value
      Throws:
      ConfException