Class ReferenceNode

All Implemented Interfaces:
Cloneable

public class ReferenceNode extends LeafNode<String>
A ReferenceNode class represents a reference (that is a config-id) in a ConfigInstance.
  • Constructor Details

    • ReferenceNode

      public ReferenceNode()
    • ReferenceNode

      public ReferenceNode(String value)
      Creates a new ReferenceNode with the given value.
      Parameters:
      value - the value of this ReferenceNode
  • Method Details

    • value

      public String value()
      Returns the value of this reference node. Same as toString() since the value of a ReferenceNode is a String (but implementations in other LeafNode sub-classes differ).
      Overrides:
      value in class LeafNode<String>
      Returns:
      the string representation of this ReferenceNode.
    • getValue

      public String getValue()
      Description copied from class: LeafNode
      Subclasses must implement this, in compliance with the rules given in the return tag.
      Specified by:
      getValue in class LeafNode<String>
      Returns:
      the String representation of the node value, or the 'null' object if the node value is null.
    • toString

      public String toString()
      Description copied from class: LeafNode
      Subclasses must implement this, in compliance with the rules given in the return tag.
      Specified by:
      toString in class LeafNode<String>
      Returns:
      the String representation of the node value, or the string "(null)" if the value is null.
    • doSetValue

      protected boolean doSetValue(String value)
      Specified by:
      doSetValue in class LeafNode<String>
    • postInitialize

      public void postInitialize(String configId)
      Overrides Node.postInitialize(String) Checks for ":parent:" values, which will be replaced by the configId.
      Overrides:
      postInitialize in class Node
      Parameters:
      configId - the configId of the ConfigInstance that owns (or is) this node