Class ConfKey

Object
com.tailf.conf.ConfObject
com.tailf.conf.ConfKey
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
ConfXKey

public class ConfKey extends ConfObject implements Cloneable, Serializable
This class represents a list key or a leaf-list element. A list key can consist of one or more values.
See Also:
  • Constructor Details

  • Method Details

    • elementAt

      public ConfObject elementAt(int i)
    • elements

      public ConfObject[] elements()
    • length

      public int length()
    • equals

      public boolean equals(Object o)
      Indicates whether a ConfKey is "equal to" this.

      A ConfKey is equals this if its components are equals.

      Specified by:
      equals in class ConfObject
      Parameters:
      o - the reference ConfKey with which to compare.
      Returns:
      true if this ConfKey is the same as the o argument; false otherwise.
    • hashCode

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

      public String toStrictlyQuotedString()
      Returns a string representation of the ConfKey. The key elements will be quoted if necessary.
      Returns:
      String representation of the key
    • toString

      public String toString()
      Returns a string representation of the ConfKey. The key elements will be quoted if necessary. Note however that this string representation is available for backward compatibility and is unsuitable for use in keypaths. Instead use toStrictlyQuotedString().
      Specified by:
      toString in class ConfObject
      Returns:
      String representation of the key
    • encode

      public ConfEObject encode()
      Specified by:
      encode in class ConfObject
    • setPath

      public void setPath(InstancePath path)
      This method is only useful if at least one of the key elements is an enumeration. In such case this method will assign the MaapiSchemas type to all such elements to be able to get a correct label when converting the key into its String representation. The path provided as an argument needs to point to the list node in the data model.