Klasse Node

Alle implementierten Schnittstellen:
IOptionalHeaderHolder, INode<Node>, BlanknessRequestable

public final class Node extends BaseNode<Node>
A Node is not mutable.
Version:
2016-01-01
Autor:
Silvan Wyss
  • Felddetails

    • EMPTY_NODE

      public static final Node EMPTY_NODE
  • Methodendetails

    • fromEnum

      public static Node fromEnum(Enum<?> pEnum)
      Parameter:
      pEnum -
      Gibt zurück:
      a new Node from the given pEnum.
    • fromFile

      public static Node fromFile(String filePath)
      Parameter:
      filePath -
      Gibt zurück:
      a new Node from the file with the given filePath.
      Löst aus:
      InvalidArgumentException - if the given filePath is not valid.
      UnrepresentingArgumentException - if the file with the given filePath does not represent a Node.
    • fromNode

      public static Node fromNode(INode<?> node)
      Parameter:
      node -
      Gibt zurück:
      a new Node from the given INode.
    • fromString

      public static Node fromString(String string)
      Parameter:
      string -
      Gibt zurück:
      a new Node from the given string.
      Löst aus:
      UnrepresentingArgumentException - if the given string does not represent a Node.
    • withChildNode

      public static Node withChildNode(boolean childNode)
      Parameter:
      childNode -
      Gibt zurück:
      a new Node with the given childNode.
    • withChildNode

      public static Node withChildNode(double childNode)
      Parameter:
      childNode -
      Gibt zurück:
      a new Node with the given childNode.
    • withChildNode

      public static Node withChildNode(INode<?> childNode, INode<?>... childNodes)
      Parameter:
      childNode -
      childNodes -
      Gibt zurück:
      a new Node with the given childNodes.
    • withChildNode

      public static Node withChildNode(long childNode)
      Parameter:
      childNode -
      Gibt zurück:
      a new Node with the given childNode.
    • withChildNode

      public static Node withChildNode(String childNode, String... childNodes)
      Parameter:
      childNode -
      childNodes -
      Gibt zurück:
      a new Node with the given childNodes.
      Löst aus:
      ArgumentIsNullException - if the given header is null.
      InvalidArgumentException - if the given header is blank.
    • withChildNodes

      public static Node withChildNodes(Iterable<? extends INode<?>> childNodes)
      Parameter:
      childNodes -
      Gibt zurück:
      a new Node with the given childNodes.
    • withHeader

      public static Node withHeader(boolean header)
      Parameter:
      header -
      Gibt zurück:
      a new Node with the given header.
    • withHeader

      public static Node withHeader(double header)
      Parameter:
      header -
      Gibt zurück:
      a new Node with the given header.
    • withHeader

      public static Node withHeader(long header)
      Parameter:
      header -
      Gibt zurück:
      a new Node with the given header.
    • withHeader

      public static Node withHeader(String header)
      Parameter:
      header -
      Gibt zurück:
      a new Node with the given header.
      Löst aus:
      ArgumentIsNullException - if the given header is null.
      InvalidArgumentException - if the given header is blank.
    • withHeaderAndChildNode

      public static Node withHeaderAndChildNode(String header, boolean childNode)
      Parameter:
      header -
      childNode -
      Gibt zurück:
      a new Node with the given childNode.
      Löst aus:
      ArgumentIsNullException - if the given header is null.
      InvalidArgumentException - if the given header is blank.
    • withHeaderAndChildNode

      public static Node withHeaderAndChildNode(String header, double childNode)
      Parameter:
      header -
      childNode -
      Gibt zurück:
      a new Node with the given childNode.
      Löst aus:
      ArgumentIsNullException - if the given header is null.
      InvalidArgumentException - if the given header is blank.
    • withHeaderAndChildNode

      public static Node withHeaderAndChildNode(String header, INode<?> childNode, INode<?>... childNodes)
      Parameter:
      header -
      childNode -
      childNodes -
      Gibt zurück:
      a new Node with the given header and childNodes.
      Löst aus:
      ArgumentIsNullException - if the given header is null.
      InvalidArgumentException - if the given header is blank.
    • withHeaderAndChildNodes

      public static Node withHeaderAndChildNodes(String header, Iterable<? extends INode<?>> childNodes)
      Parameter:
      header -
      childNodes -
      Gibt zurück:
      a new Node with the given childNodes.
      Löst aus:
      ArgumentIsNullException - if the given header is null.
      InvalidArgumentException - if the given header is blank.
    • withHeaderAndChildNode

      public static Node withHeaderAndChildNode(String header, long childNode)
      Parameter:
      header -
      childNode -
      Gibt zurück:
      a new Node with the given childNode.
      Löst aus:
      ArgumentIsNullException - if the given header is null.
      InvalidArgumentException - if the given header is blank.
    • withHeaderAndChildNode

      public static Node withHeaderAndChildNode(String header, String childNode, String... childNodes)
      Parameter:
      header -
      childNode -
      childNodes -
      Gibt zurück:
      a new Node with the given header and childNodes.
      Löst aus:
      ArgumentIsNullException - if the given header is null.
      InvalidArgumentException - if the given header is blank.
      ArgumentIsNullException - if one of the given childNodes is null.
      InvalidArgumentException - if one of the given childNodes is blank.
    • asWithHeader

      public INode<?> asWithHeader(String header)
      Parameter:
      header -
      Gibt zurück:
      a new INode that is a copy of the current INode with the given header.
    • equals

      public boolean equals(Object object)
      Setzt außer Kraft:
      equals in Klasse Object
    • getHeader

      public String getHeader()
      Gibt zurück:
      the header of the current IOptionalHeaderHolder.
    • getStoredChildNodes

      public IContainer<Node> getStoredChildNodes()
      Gibt zurück:
      the child INodes of the current INode.
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse Object
    • hasHeader

      public boolean hasHeader()
      Gibt zurück:
      true if the current IOptionalHeaderHolder has a header.