Schnittstelle IMutableNode<MN extends IMutableNode<MN>>
- Typparameter:
MN
- is the type of aIMutableNode
.
- 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
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungaddChildNode
(INode<?> childNode, INode<?>... childNodes) Adds the given childNodes to the currentIMutableNode
.addChildNodeFromString
(String string, String... strings) Adds the childINode
s from the given strings the currentIMutableNode
.addChildNodes
(Iterable<N> childNodes) Adds the given childNodes to the currentIMutableNode
.addChildNodesFromStrings
(Iterable<String> strings) Adds the childINode
s from the given strings the currentIMutableNode
.addPostfixToHeader
(String postfix) Adds the given postfix at the end of the header of the currentIMutableNode
if the currentIMutableNode
has a header.addPrefixToHeader
(String prefix) Adds the given prefix at the begin of the header of the currentIMutableNode
if the currentIMutableNode
has a header.removeAndGetStoredFirstChildNodeThat
(Predicate<INode<?>> selector) Removes and returns the first childINode
the given selector selects from the currentIMutableNode
.void
Removes the childINode
s from the currentIMutableNode
.void
removeFirstChildNodeThat
(Predicate<? extends INode<?>> selector) Removes the first childINode
the given selector selects from the currentIMutableNode
.void
removeFirstChildNodeWithHeader
(String header) Removes the first childINode
with the given header from the currentIMutableNode
.void
replaceFirstChildNodeWithGivenHeaderByGivenNode
(String header, INode<?> node) Replaces the first childINode
with the given header from the currentIMutableNode
by the givenINode
.void
reset()
Removes the header and childINode
s of the currentIMutableNode
.void
resetFromFile
(String filePath) Resets the currentIMutableNode
from the file with the given file path.void
resetFromString
(String string) Resets the currentIMutableNode
from the given string.setChildNodes
(Iterable<? extends INode<?>> childNodes) Resets the childINode
s of the currentIMutableNode
with the given childNodes.Von Schnittstelle geerbte Methoden ch.nolix.coreapi.stateapi.staterequestapi.BlanknessRequestable
isBlank
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.attributeapi.fluentmutableoptionalattributeapi.IFluentMutableOptionalHeaderHolder
removeHeader, setHeader
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.documentapi.nodeapi.INode
asWithHeader, containsChildNodes, containsChildNodeThat, containsChildNodeWithHeader, containsOneChildNode, getChildNodeCount, getChildNodesHeaders, getOptionalStoredFirstChildNodeThat, getSingleChildNodeAsBoolean, getSingleChildNodeAsDouble, getSingleChildNodeAsInt, getSingleChildNodeHeader, getStoredChildNodeAt1BasedIndex, getStoredChildNodes, getStoredChildNodesThat, getStoredChildNodesWithHeader, getStoredFirstChildNode, getStoredFirstChildNodeThat, getStoredFirstChildNodeWithHeader, getStoredSingleChildNode, toBoolean, toDouble, toFormattedString, toInt, toXml
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.attributeapi.optionalattributeapi.IOptionalHeaderHolder
getHeader, getHeaderOrEmptyString, getOptionalHeader, hasHeader, hasHeader
-
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 childINode
s 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:
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
Adds the childINode
s 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 currentIMutableNode
if the currentIMutableNode
has a header. Sets the given postfix as the header of the currentIMutableNode
if the currentIMutableNode
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
Adds the given prefix at the begin of the header of the currentIMutableNode
if the currentIMutableNode
has a header. Sets the given prefix as the header of the currentIMutableNode
if the currentIMutableNode
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
Removes and returns the first childINode
the given selector selects from the currentIMutableNode
.- Parameter:
selector
-- Gibt zurück:
- the first child
INode
the given selector selects from the currentIMutableNode
. - Löst aus:
RuntimeException
- if the currentIMutableNode
does not contain a childINode
the given selector selects.
-
removeChildNodes
void removeChildNodes()Removes the childINode
s from the currentIMutableNode
. -
removeFirstChildNodeThat
Removes the first childINode
the given selector selects from the currentIMutableNode
.- Parameter:
selector
-- Löst aus:
RuntimeException
- if the currentIMutableNode
does not contain a childINode
the given selector selects.
-
removeFirstChildNodeWithHeader
Removes the first childINode
with the given header from the currentIMutableNode
.- Parameter:
header
-- Löst aus:
RuntimeException
- if the currentIMutableNode
does not contain a childINode
with the given header.
-
replaceFirstChildNodeWithGivenHeaderByGivenNode
Replaces the first childINode
with the given header from the currentIMutableNode
by the givenINode
.- Parameter:
header
-node
-- Löst aus:
RuntimeException
- if the currentIMutableNode
does not contain a childINode
with the given header.
-
reset
void reset()Removes the header and childINode
s of the currentIMutableNode
. -
resetFromFile
Resets the currentIMutableNode
from the file with the given file path.- Parameter:
filePath
-
-
resetFromString
Resets the currentIMutableNode
from the given string.- Parameter:
string
-- Löst aus:
RuntimeException
- if the given string does not represent aIMutableNode
.
-
setChildNodes
Resets the childINode
s of the currentIMutableNode
with the given childNodes.- Parameter:
childNodes
-- Gibt zurück:
- the current
IMutableNode
. - Löst aus:
RuntimeException
- if one of the given childNodes is null.
-