Package ch.nolix.coreapi.document.node
Schnittstelle IMutableNode<N extends IMutableNode<N>>
- Typparameter:
N- is the type of aIMutableNode.
- Alle Superschnittstellen:
BlanknessRequestable,IFluentMutableOptionalHeaderHolder<N>,INode<N>,IOptionalHeaderHolder,Resettable
- Alle bekannten Implementierungsklassen:
AbstractMutableNode,FileNode,MutableNode
public interface IMutableNode<N extends IMutableNode<N>>
extends INode<N>, IFluentMutableOptionalHeaderHolder<N>, Resettable
A
IMutableNode is a INode that is mutable.- Version:
- 2022-06-25
- Autor:
- Silvan Wyss
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungaddChildNode(INode<?> childNode, INode<?>... childNodes) Adds the given childNodes to the currentIMutableNode.addChildNodeFromString(String string, String... strings) Adds the childINodes from the given strings the currentIMutableNode.addChildNodes(Iterable<N2> childNodes) Adds the given childNodes to the currentIMutableNode.addChildNodesFromStrings(Iterable<String> strings) Adds the childINodes from the given strings the currentIMutableNode.addPostfixToHeader(String postfix) Adds the given postfix at the end of the header of the currentIMutableNodeif the currentIMutableNodehas a header.addPrefixToHeader(String prefix) Adds the given prefix at the begin of the header of the currentIMutableNodeif the currentIMutableNodehas a header.removeAndGetStoredFirstChildNodeThat(Predicate<INode<?>> selector) Removes and returns the first childINodethe given selector selects from the currentIMutableNode.voidRemoves the childINodes from the currentIMutableNode.voidremoveFirstChildNodeThat(Predicate<INode<?>> selector) Removes the first childINodethe given selector selects from the currentIMutableNode.voidremoveFirstChildNodeWithHeader(String header) Removes the first childINodewith the given header from the currentIMutableNode.voidreplaceFirstChildNodeWithGivenHeaderByGivenNode(String header, INode<?> node) Replaces the first childINodewith the given header from the currentIMutableNodeby the givenINode.voidresetFromFile(String filePath) Resets the currentIMutableNodefrom the file with the given file path.voidresetFromNode(INode<?> node) Resets the currentIMutableNodefrom the given node.voidresetFromString(String string) Resets the currentIMutableNodefrom the given string.setChildNodes(Iterable<? extends INode<?>> childNodes) Resets the childINodes of the currentIMutableNodewith the given childNodes.Von Schnittstelle geerbte Methoden ch.nolix.coreapi.state.staterequest.BlanknessRequestable
isBlankVon Schnittstelle geerbte Methoden ch.nolix.coreapi.attribute.fluentmutableoptionalattribute.IFluentMutableOptionalHeaderHolder
removeHeader, setHeaderVon Schnittstelle geerbte Methoden ch.nolix.coreapi.document.node.INode
asWithHeader, containsChildNodes, containsChildNodeThat, containsChildNodeWithHeader, containsOneChildNode, getChildNodeCount, getChildNodesHeaders, getOptionalStoredFirstChildNodeThat, getSingleChildNodeAsBoolean, getSingleChildNodeAsDouble, getSingleChildNodeAsInt, getSingleChildNodeHeader, getStoredChildNodeAtOneBasedIndex, getStoredChildNodes, getStoredChildNodesThat, getStoredChildNodesWithHeader, getStoredFirstChildNode, getStoredFirstChildNodeThat, getStoredFirstChildNodeWithHeader, getStoredSingleChildNode, toBoolean, toDouble, toFormattedString, toInt, toXmlVon Schnittstelle geerbte Methoden ch.nolix.coreapi.attribute.optionalattribute.IOptionalHeaderHolder
getHeader, getHeaderOrEmptyString, getOptionalHeader, hasHeader, hasHeaderVon Schnittstelle geerbte Methoden ch.nolix.coreapi.state.statemutation.Resettable
reset
-
Methodendetails
-
addChildNode
Adds the given childNodes to the currentIMutableNode.- Parameter:
childNode-childNodes-- Gibt zurück:
- the current
IMutableNode. - Löst aus:
RuntimeException- if one of the given childNodes is null.
-
addChildNodeFromString
Adds the childINodes from the given strings the currentIMutableNode.- Parameter:
string-strings-- Gibt zurück:
- the current
IMutableNode. - Löst aus:
RuntimeException- if one of the given strings does not represent aINode.
-
addChildNodes
Adds the given childNodes to the currentIMutableNode.- Typparameter:
N2- 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
Adds the childINodes from the given strings the currentIMutableNode.- Parameter:
strings-- Gibt zurück:
- the current
IMutableNode. - Löst aus:
RuntimeException- if one of the given strings does not represent aINode.
-
addPostfixToHeader
Adds the given postfix at the end of the header of the currentIMutableNodeif the currentIMutableNodehas a header. Sets the given postfix as the header of the currentIMutableNodeif the currentIMutableNodedoes 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
Adds the given prefix at the begin of the header of the currentIMutableNodeif the currentIMutableNodehas a header. Sets the given prefix as the header of the currentIMutableNodeif the currentIMutableNodedoes 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
Removes and returns the first childINodethe given selector selects from the currentIMutableNode.- Parameter:
selector-- Gibt zurück:
- the first child
INodethe given selector selects from the currentIMutableNode. - Löst aus:
RuntimeException- if the currentIMutableNodedoes not contain a childINodethe given selector selects.
-
removeChildNodes
void removeChildNodes()Removes the childINodes from the currentIMutableNode. -
removeFirstChildNodeThat
Removes the first childINodethe given selector selects from the currentIMutableNode.- Parameter:
selector-- Löst aus:
RuntimeException- if the currentIMutableNodedoes not contain a childINodethe given selector selects.
-
removeFirstChildNodeWithHeader
Removes the first childINodewith the given header from the currentIMutableNode.- Parameter:
header-- Löst aus:
RuntimeException- if the currentIMutableNodedoes not contain a childINodewith the given header.
-
replaceFirstChildNodeWithGivenHeaderByGivenNode
Replaces the first childINodewith the given header from the currentIMutableNodeby the givenINode.- Parameter:
header-node-- Löst aus:
RuntimeException- if the currentIMutableNodedoes not contain a childINodewith the given header.
-
resetFromFile
Resets the currentIMutableNodefrom the file with the given file path.- Parameter:
filePath-
-
resetFromNode
Resets the currentIMutableNodefrom the given node.- Parameter:
node-- Löst aus:
RuntimeException- if the given node is null.
-
resetFromString
Resets the currentIMutableNodefrom the given string.- Parameter:
string-- Löst aus:
RuntimeException- if the given string does not represent aIMutableNode.
-
setChildNodes
Resets the childINodes of the currentIMutableNodewith the given childNodes.- Parameter:
childNodes-- Gibt zurück:
- the current
IMutableNode. - Löst aus:
RuntimeException- if one of the given childNodes is null.
-