Class AbstractMutableNode<N extends AbstractMutableNode<N>>
java.lang.Object
ch.nolix.base.document.node.AbstractNode<N>
ch.nolix.base.document.node.AbstractMutableNode<N>
- Type Parameters:
N- is the type of aAbstractMutableNode.
- All Implemented Interfaces:
IFluentMutableOptionalHeaderHolder<N>, IOptionalHeaderHolder, IMutableNode<N>, INode<N>, Resettable, BlanknessRequestable
- Direct Known Subclasses:
FileNode, MutableNode
public abstract class AbstractMutableNode<N extends AbstractMutableNode<N>>
extends AbstractNode<N>
implements IMutableNode<N>
- Author:
- Silvan Wyss
-
Field Summary
Fields inherited from class AbstractNode
CLOSED_BRACKET_CODE, COMMA_CODE, DOLLAR_SYMBOL_CODE, OPEN_BRACKET_CODE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal NaddPostfixToHeader(String postfix) Adds the given postfix at the end of the header of the currentIMutableNodeif the currentIMutableNodehas a header.final NaddPrefixToHeader(String prefix) Adds the given prefix at the begin of the header of the currentIMutableNodeif the currentIMutableNodehas a header.final voidresetFromFile(String filePath) Resets the currentIMutableNodefrom the file with the given file path.final voidresetFromNode(INode<?> node) Resets the currentIMutableNodefrom the given node.final voidresetFromString(String string) Resets the currentIMutableNodefrom the given string.final NsetChildNodes(Iterable<? extends INode<?>> childNodes) Resets the childINodes of the currentIMutableNodewith the given childNodes.Methods inherited from class AbstractNode
containsChildNodes, containsChildNodeThat, containsChildNodeWithHeader, containsOneChildNode, equals, getChildNodeCount, getChildNodeCount, getChildNodesHeaders, getEscapeStringFor, getOptionalStoredFirstChildNodeThat, getOriginStringFromEscapeString, getSingleChildNodeAsBoolean, getSingleChildNodeAsDouble, getSingleChildNodeAsInt, getSingleChildNodeHeader, getStoredChildNodeAtOneBasedIndex, getStoredChildNodesThat, getStoredChildNodesWithHeader, getStoredFirstChildNode, getStoredFirstChildNodeThat, getStoredFirstChildNodeWithHeader, getStoredSingleChildNode, hashCode, isBlank, saveToFile, saveToFile, toBoolean, toDouble, toFormattedString, toInt, toString, toXmlMethods inherited from interface BlanknessRequestable
isBlankMethods inherited from interface IFluentMutableOptionalHeaderHolder
removeHeader, setHeaderMethods inherited from interface IMutableNode
addChildNode, addChildNodes, addChildNodes, addChildNodesFromStrings, addChildNodesFromStrings, removeAndGetStoredFirstChildNodeThat, removeChildNodes, removeFirstChildNodeThat, removeFirstChildNodeWithHeader, replaceFirstChildNodeWithGivenHeaderByGivenNodeMethods inherited from interface INode
asWithHeader, containsChildNodes, containsChildNodeThat, containsChildNodeWithHeader, containsOneChildNode, getChildNodeCount, getChildNodeCount, getChildNodesHeaders, getOptionalStoredFirstChildNodeThat, getSingleChildNodeAsBoolean, getSingleChildNodeAsDouble, getSingleChildNodeAsInt, getSingleChildNodeHeader, getStoredChildNodeAtOneBasedIndex, getStoredChildNodes, getStoredChildNodesThat, getStoredChildNodesWithHeader, getStoredFirstChildNode, getStoredFirstChildNodeThat, getStoredFirstChildNodeWithHeader, getStoredSingleChildNode, toBoolean, toDouble, toFormattedString, toInt, toXmlMethods inherited from interface IOptionalHeaderHolder
getHeader, getHeaderOrEmptyString, getOptionalHeader, hasHeader, hasHeaderMethods inherited from interface Resettable
reset
-
Constructor Details
-
AbstractMutableNode
public AbstractMutableNode()
-
-
Method Details
-
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.- Specified by:
addPostfixToHeaderin interfaceIMutableNode<N extends AbstractMutableNode<N>>- Parameters:
postfix-- Returns:
- the current
IMutableNode.
-
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.- Specified by:
addPrefixToHeaderin interfaceIMutableNode<N extends AbstractMutableNode<N>>- Parameters:
prefix-- Returns:
- the current
IMutableNode.
-
resetFromFile
Resets the currentIMutableNodefrom the file with the given file path.- Specified by:
resetFromFilein interfaceIMutableNode<N extends AbstractMutableNode<N>>- Parameters:
filePath-
-
resetFromNode
Resets the currentIMutableNodefrom the given node.- Specified by:
resetFromNodein interfaceIMutableNode<N extends AbstractMutableNode<N>>- Parameters:
node-
-
resetFromString
Resets the currentIMutableNodefrom the given string.- Specified by:
resetFromStringin interfaceIMutableNode<N extends AbstractMutableNode<N>>- Parameters:
string-
-
setChildNodes
Resets the childINodes of the currentIMutableNodewith the given childNodes.- Specified by:
setChildNodesin interfaceIMutableNode<N extends AbstractMutableNode<N>>- Parameters:
childNodes-- Returns:
- the current
IMutableNode.
-