Class ReferenceNode

  • All Implemented Interfaces:
    java.lang.Cloneable

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

      Constructors 
      Constructor Description
      ReferenceNode()  
      ReferenceNode​(java.lang.String value)
      Creates a new ReferenceNode with the given value.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean doSetValue​(java.lang.String value)  
      java.lang.String getValue()
      Subclasses must implement this, in compliance with the rules given in the return tag.
      void postInitialize​(java.lang.String configId)
      Overrides Node.postInitialize(String) Checks for ":parent:" values, which will be replaced by the configId.
      java.lang.String toString()
      Subclasses must implement this, in compliance with the rules given in the return tag.
      java.lang.String value()
      Returns the value of this reference node.
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ReferenceNode

        public ReferenceNode()
      • ReferenceNode

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

      • value

        public java.lang.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<java.lang.String>
        Returns:
        the string representation of this ReferenceNode.
      • getValue

        public java.lang.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<java.lang.String>
        Returns:
        the String representation of the node value, or the 'null' object if the node value is null.
      • toString

        public java.lang.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<java.lang.String>
        Returns:
        the String representation of the node value, or the string "(null)" if the value is null.
      • doSetValue

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

        public void postInitialize​(java.lang.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