Class LeafNode<T>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean initialized  
      protected T value  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected LeafNode()
      Creates a new, uninitialized LeafNode
      protected LeafNode​(boolean initialized)
      Creates a new LeafNode.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.Object clone()
      This method is meant for internal use in the configuration system.
      protected abstract boolean doSetValue​(java.lang.String value)  
      boolean equals​(java.lang.Object o)  
      abstract java.lang.String getValue()
      Subclasses must implement this, in compliance with the rules given in the return tag.
      int hashCode()  
      protected boolean setValue​(java.lang.String value)
      Sets the value based on a string representation.
      abstract java.lang.String toString()
      Subclasses must implement this, in compliance with the rules given in the return tag.
      T value()  
      • Methods inherited from class java.lang.Object

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

      • initialized

        protected boolean initialized
      • value

        protected T value
    • Constructor Detail

      • LeafNode

        protected LeafNode()
        Creates a new, uninitialized LeafNode
      • LeafNode

        protected LeafNode​(boolean initialized)
        Creates a new LeafNode.
        Parameters:
        initialized - true if this node is initialized.
    • Method Detail

      • value

        public T value()
      • toString

        public abstract java.lang.String toString()
        Subclasses must implement this, in compliance with the rules given in the return tag.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the String representation of the node value, or the string "(null)" if the value is null.
      • getValue

        public abstract java.lang.String getValue()
        Subclasses must implement this, in compliance with the rules given in the return tag.
        Returns:
        the String representation of the node value, or the 'null' object if the node value is null.
      • setValue

        protected final boolean setValue​(java.lang.String value)
        Sets the value based on a string representation. Returns false if the value could not be set from the given string. TODO: return void (see doSetValue)
        Parameters:
        value - the value to set
        Returns:
        true on success, false otherwise
        Throws:
        java.lang.IllegalArgumentException - when value is null
      • doSetValue

        protected abstract boolean doSetValue​(java.lang.String value)
      • clone

        protected java.lang.Object clone()
        This method is meant for internal use in the configuration system. Overrides Object.clone().
        Overrides:
        clone in class Node
        Returns:
        a new instance similar to this object.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object