Schnittstelle INode<N extends INode<N>>

Typparameter:
N - is the type of a INode.
Alle Superschnittstellen:
BlanknessRequestable, IOptionalHeaderHolder
Alle bekannten Unterschnittstellen:
IMutableNode<MN>
Alle bekannten Implementierungsklassen:
BaseMutableNode, BaseNode, FileNode, MutableNode, Node

public interface INode<N extends INode<N>> extends BlanknessRequestable, IOptionalHeaderHolder
A INode has the following attributes. -0 or 1 header -an arbitrary number of child INodes A INode that does not have a header and does not contains attributes is blank. A sub type of INode may be or may be not mutable.
Version:
2022-06-24
Autor:
Silvan Wyss
  • Methodendetails

    • asWithHeader

      INode<?> asWithHeader(String header)
      Parameter:
      header -
      Gibt zurück:
      a new INode that is a copy of the current INode with the given header.
      Löst aus:
      RuntimeException - if the given header is null.
      RuntimeException - if the given header is blank.
    • containsChildNodes

      boolean containsChildNodes()
      Gibt zurück:
      true if the current INode contains child INodes.
    • containsChildNodeThat

      boolean containsChildNodeThat(Predicate<INode<?>> selector)
      Parameter:
      selector -
      Gibt zurück:
      true if the current INode contains a child INode the given selector selects.
    • containsChildNodeWithHeader

      boolean containsChildNodeWithHeader(String header)
      Parameter:
      header -
      Gibt zurück:
      true if the current INode contains a child INode with the given header.
    • containsOneChildNode

      boolean containsOneChildNode()
      Gibt zurück:
      true if the current INode contains 1 child INode.
    • getChildNodeCount

      int getChildNodeCount()
      Gibt zurück:
      the number of child INodes of the current INode.
    • getChildNodesHeaders

      IContainer<String> getChildNodesHeaders()
      Gibt zurück:
      the headers of the child INodes of the current INode.
      Löst aus:
      RuntimeException - if one of the child INodes of the current INode does not have a header.
    • getOptionalStoredFirstChildNodeThat

      Optional<N> getOptionalStoredFirstChildNodeThat(Predicate<INode<?>> selector)
      Parameter:
      selector -
      Gibt zurück:
      a new Optional wit the first child INode the given selector selects from the current INode, an empty Optional otherwise.
    • getStoredChildNodeAt1BasedIndex

      N getStoredChildNodeAt1BasedIndex(int p1BasedIndex)
      Parameter:
      p1BasedIndex -
      Gibt zurück:
      the child INode at the given p1BasedIndex from the current INode.
      Löst aus:
      RuntimeException - if the given index is not positive.
      RuntimeException - if the current INode does not contain a child INode at the given p1BasedIndex.
    • getStoredChildNodes

      IContainer<N> getStoredChildNodes()
      Gibt zurück:
      the child INodes of the current INode.
    • getStoredChildNodesThat

      IContainer<N> getStoredChildNodesThat(Predicate<INode<?>> selector)
      Parameter:
      selector -
      Gibt zurück:
      the child INodes the given selector selects from the current INode.
    • getStoredChildNodesWithHeader

      IContainer<N> getStoredChildNodesWithHeader(String header)
      Parameter:
      header -
      Gibt zurück:
      the child INodes with the given header from the current INode.
    • getStoredFirstChildNode

      N getStoredFirstChildNode()
      Gibt zurück:
      the first child INode from the current INode.
      Löst aus:
      RuntimeException - if the current INode does not contain child INodes.
    • getStoredFirstChildNodeThat

      N getStoredFirstChildNodeThat(Predicate<INode<?>> selector)
      Parameter:
      selector -
      Gibt zurück:
      the first child INode the given selector selects from the current INode.
      Löst aus:
      RuntimeException - if the current INode does not contain a child INode the given selector selects.
    • getStoredFirstChildNodeWithHeader

      N getStoredFirstChildNodeWithHeader(String header)
      Parameter:
      header -
      Gibt zurück:
      the first child INode with the given header from the current INode.
      Löst aus:
      RuntimeException - if the current INode does not contain a child INode with the given header.
    • getStoredSingleChildNode

      N getStoredSingleChildNode()
      Gibt zurück:
      the single child INode of the current INode.
      Löst aus:
      RuntimeException - if the current INode does not contain child INodes or contains several child INodes.
    • getSingleChildNodeAsBoolean

      boolean getSingleChildNodeAsBoolean()
      Gibt zurück:
      the boolean the single child INode of the current INode represents.
      Löst aus:
      RuntimeException - if the current INode does not contain child INodes or contains several child INodes.
      RuntimeException - if the single child INode of the current INode does not represent a boolean.
    • getSingleChildNodeAsDouble

      double getSingleChildNodeAsDouble()
      Gibt zurück:
      the double the single child INode of the current INode represents.
      Löst aus:
      RuntimeException - if the current INode does not contain child INodes or contains several child INodes.
      RuntimeException - if the single child INode of the current INode does not represent a double.
    • getSingleChildNodeAsInt

      int getSingleChildNodeAsInt()
      Gibt zurück:
      the int the single child INode of the current INode represents.
      Löst aus:
      RuntimeException - if the current INode does not contain child INodes or contains several child INodes.
      RuntimeException - if the single child INode of the current INode does not represent an int.
    • getSingleChildNodeHeader

      String getSingleChildNodeHeader()
      Gibt zurück:
      the header of the single child INode of the current INode.
      Löst aus:
      RuntimeException - if the current INode does not contain child INodes or contains several child INodes.
      RuntimeException - if the single child INode of the current INode does not have a header.
    • toBoolean

      boolean toBoolean()
      Gibt zurück:
      the boolean the current INode represents.
      Löst aus:
      RuntimeException - if the current INode does not represent a boolean.
    • toDouble

      double toDouble()
      Gibt zurück:
      the double the current INode represents.
      Löst aus:
      RuntimeException - if the current INode does not represent a double.
    • toFormattedString

      String toFormattedString()
      Gibt zurück:
      a formatted String representation of the current INode.
    • toInt

      int toInt()
      Gibt zurück:
      the int the current INode represents.
      Löst aus:
      RuntimeException - if the current INode does not represent an int.
    • toXml

      IXmlNode<?> toXml()
      Gibt zurück:
      a IXmlNode representation of the current INode.