Class LeafNode<T>

    • 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 String toString()
        Subclasses must implement this, in compliance with the rules given in the return tag.
        Overrides:
        toString in class Object
        Returns:
        the String representation of the node value, or the string "(null)" if the value is null.
      • getValue

        public abstract 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​(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:
        IllegalArgumentException - when value is null
      • doSetValue

        protected abstract boolean doSetValue​(String value)
      • clone

        protected 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.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object