Schnittstelle IMutableNode<MN extends IMutableNode<MN>>

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

public interface IMutableNode<MN extends IMutableNode<MN>> extends INode<MN>, IFluentMutableOptionalHeaderHolder<MN>
A IMutableNode is a INode that is mutable.
Version:
2022-06-25
Autor:
Silvan Wyss
  • Methodendetails

    • addChildNode

      MN addChildNode(INode<?> childNode, INode<?>... childNodes)
      Adds the given childNodes to the current IMutableNode.
      Parameter:
      childNode -
      childNodes -
      Gibt zurück:
      the current IMutableNode.
      Löst aus:
      RuntimeException - if one of the given childNodes is null.
    • addChildNodeFromString

      MN addChildNodeFromString(String string, String... strings)
      Adds the child INodes from the given strings the current IMutableNode.
      Parameter:
      string -
      strings -
      Gibt zurück:
      the current IMutableNode.
      Löst aus:
      RuntimeException - if one of the given strings does not represent a INode.
    • addChildNodes

      <N extends INode<?>> MN addChildNodes(Iterable<N> childNodes)
      Adds the given childNodes to the current IMutableNode.
      Typparameter:
      N - is the type of the given childNodes.
      Parameter:
      childNodes -
      Gibt zurück:
      the current IMutableNode.
      Löst aus:
      RuntimeException - if one of the given childNodes is null.
    • addChildNodesFromStrings

      MN addChildNodesFromStrings(Iterable<String> strings)
      Adds the child INodes from the given strings the current IMutableNode.
      Parameter:
      strings -
      Gibt zurück:
      the current IMutableNode.
      Löst aus:
      RuntimeException - if one of the given strings does not represent a INode.
    • addPostfixToHeader

      MN addPostfixToHeader(String postfix)
      Adds the given postfix at the end of the header of the current IMutableNode if the current IMutableNode has a header. Sets the given postfix as the header of the current IMutableNode if the current IMutableNode does not have a header.
      Parameter:
      postfix -
      Gibt zurück:
      the current IMutableNode.
      Löst aus:
      RuntimeException - if the given postfix is null.
      RuntimeException - if the given postfix is blank.
    • addPrefixToHeader

      MN addPrefixToHeader(String prefix)
      Adds the given prefix at the begin of the header of the current IMutableNode if the current IMutableNode has a header. Sets the given prefix as the header of the current IMutableNode if the current IMutableNode does not have a header.
      Parameter:
      prefix -
      Gibt zurück:
      the current IMutableNode.
      Löst aus:
      RuntimeException - if the given prefix is null.
      RuntimeException - if the given prefix is blank.
    • removeAndGetStoredFirstChildNodeThat

      MN removeAndGetStoredFirstChildNodeThat(Predicate<INode<?>> selector)
      Removes and returns the first child INode the given selector selects from the current IMutableNode.
      Parameter:
      selector -
      Gibt zurück:
      the first child INode the given selector selects from the current IMutableNode.
      Löst aus:
      RuntimeException - if the current IMutableNode does not contain a child INode the given selector selects.
    • removeChildNodes

      void removeChildNodes()
      Removes the child INodes from the current IMutableNode.
    • removeFirstChildNodeThat

      void removeFirstChildNodeThat(Predicate<? extends INode<?>> selector)
      Removes the first child INode the given selector selects from the current IMutableNode.
      Parameter:
      selector -
      Löst aus:
      RuntimeException - if the current IMutableNode does not contain a child INode the given selector selects.
    • removeFirstChildNodeWithHeader

      void removeFirstChildNodeWithHeader(String header)
      Removes the first child INode with the given header from the current IMutableNode.
      Parameter:
      header -
      Löst aus:
      RuntimeException - if the current IMutableNode does not contain a child INode with the given header.
    • replaceFirstChildNodeWithGivenHeaderByGivenNode

      void replaceFirstChildNodeWithGivenHeaderByGivenNode(String header, INode<?> node)
      Replaces the first child INode with the given header from the current IMutableNode by the given INode.
      Parameter:
      header -
      node -
      Löst aus:
      RuntimeException - if the current IMutableNode does not contain a child INode with the given header.
    • reset

      void reset()
      Removes the header and child INodes of the current IMutableNode.
    • resetFromFile

      void resetFromFile(String filePath)
      Resets the current IMutableNode from the file with the given file path.
      Parameter:
      filePath -
    • resetFromString

      void resetFromString(String string)
      Resets the current IMutableNode from the given string.
      Parameter:
      string -
      Löst aus:
      RuntimeException - if the given string does not represent a IMutableNode.
    • setChildNodes

      MN setChildNodes(Iterable<? extends INode<?>> childNodes)
      Resets the child INodes of the current IMutableNode with the given childNodes.
      Parameter:
      childNodes -
      Gibt zurück:
      the current IMutableNode.
      Löst aus:
      RuntimeException - if one of the given childNodes is null.