Class ConfAttributeValue

Object
com.tailf.conf.ConfObject
com.tailf.conf.ConfValue
com.tailf.conf.ConfAttributeValue
All Implemented Interfaces:
Serializable, Cloneable, Comparable<ConfAttributeValue>

public class ConfAttributeValue extends ConfValue implements Cloneable, Serializable, Comparable<ConfAttributeValue>
Class that represents an attribute value for an element in a model. An attribute value consists of a type and a value. The type is defined by ConfAttributeType and the value by a subclass of ConfValue
See Also:
  • Constructor Details

    • ConfAttributeValue

      public ConfAttributeValue(ConfAttributeType typ, ConfValue val)
      Constructor of ConfAttributeValue Consists of a value and a type. The legal values for each type is defined in ConfAttributeType
      Parameters:
      typ - ConfAttributeType
      val - subclass to ConfValue
  • Method Details

    • getAttributeType

      public ConfAttributeType getAttributeType()
      Get the Attribute type for this attribute value
      Returns:
      ConfAttributeType the attribute type
    • getAttributeValue

      public ConfValue getAttributeValue()
      Get the value of the attribute
      Returns:
      ConfValue the value of the attribute
    • setRemoveValue

      public void setRemoveValue()
      Mark this attribute value for removal.
    • isRemoveValue

      public boolean isRemoveValue()
      Check if the attribute is set to be removed
      Returns:
      boolean true if set to be removed
    • setAttributeType

      public void setAttributeType(ConfAttributeType attributeType)
      Set the attribute type for this attribute value
      Parameters:
      attributeType - ConfAttributeType
    • setAttributeValue

      public void setAttributeValue(ConfValue attributeValue)
      Set the value for this attribute value
      Parameters:
      attributeValue - ConfValue
    • equals

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

      public String toString()
      Specified by:
      toString in class ConfValue
      Returns:
      the printable representation of the object.
    • hashCode

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

      public ConfEObject encode()
      Description copied from class: ConfValue
      encode value.
      Specified by:
      encode in class ConfValue
    • compareTo

      public int compareTo(ConfAttributeValue o)
      Specified by:
      compareTo in interface Comparable<ConfAttributeValue>