Package ch.nolix.coreapi.document.node
Schnittstelle INode<N extends INode<N>>
- Typparameter:
N- is the type of aINode.
- Alle Superschnittstellen:
BlanknessRequestable,IOptionalHeaderHolder
- Alle bekannten Unterschnittstellen:
IMutableNode<N>
- Alle bekannten Implementierungsklassen:
AbstractMutableNode,AbstractNode,FileNode,MutableNode,Node
A
INode has the following attributes. -0 or 1 header -an arbitrary
number of child INodes
A INode that does not have a header and does not contains attributes
is blank.
A sub type of INode may be or may be not mutable.- Version:
- 2022-06-24
- Autor:
- Silvan Wyss
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungINode<?> asWithHeader(String header) booleanbooleancontainsChildNodeThat(Predicate<INode<?>> selector) booleancontainsChildNodeWithHeader(String header) booleanintgetOptionalStoredFirstChildNodeThat(Predicate<INode<?>> selector) booleandoubleintgetStoredChildNodeAtOneBasedIndex(int oneBasedIndex) getStoredChildNodesThat(Predicate<INode<?>> selector) getStoredChildNodesWithHeader(String header) getStoredFirstChildNodeThat(Predicate<INode<?>> selector) booleandoubletoDouble()inttoInt()IXmlNode<?> toXml()Von Schnittstelle geerbte Methoden ch.nolix.coreapi.state.staterequest.BlanknessRequestable
isBlankVon Schnittstelle geerbte Methoden ch.nolix.coreapi.attribute.optionalattribute.IOptionalHeaderHolder
getHeader, getHeaderOrEmptyString, getOptionalHeader, hasHeader, hasHeader
-
Methodendetails
-
asWithHeader
- Parameter:
header-- Gibt zurück:
- a new
INodethat is a copy of the currentINodewith the given header. - Löst aus:
RuntimeException- if the given header is null.RuntimeException- if the given header is blank.
-
containsChildNodes
boolean containsChildNodes() -
containsChildNodeThat
-
containsChildNodeWithHeader
-
containsOneChildNode
boolean containsOneChildNode() -
getChildNodeCount
int getChildNodeCount() -
getChildNodesHeaders
IContainer<String> getChildNodesHeaders()- Gibt zurück:
- the headers of the child
INodes of the currentINode. - Löst aus:
RuntimeException- if one of the childINodes of the currentINodedoes not have a header.
-
getOptionalStoredFirstChildNodeThat
-
getStoredChildNodeAtOneBasedIndex
- Parameter:
oneBasedIndex-- Gibt zurück:
- the child
INodeat the given oneBasedIndex from the currentINode. - Löst aus:
RuntimeException- if the given index is not positive.RuntimeException- if the currentINodedoes not contain a childINodeat the given oneBasedIndex.
-
getStoredChildNodes
IContainer<N> getStoredChildNodes() -
getStoredChildNodesThat
-
getStoredChildNodesWithHeader
-
getStoredFirstChildNode
N getStoredFirstChildNode()- Gibt zurück:
- the first child
INodefrom the currentINode. - Löst aus:
RuntimeException- if the currentINodedoes not contain childINodes.
-
getStoredFirstChildNodeThat
- Parameter:
selector-- Gibt zurück:
- the first child
INodethe given selector selects from the currentINode. - Löst aus:
RuntimeException- if the currentINodedoes not contain a childINodethe given selector selects.
-
getStoredFirstChildNodeWithHeader
- Parameter:
header-- Gibt zurück:
- the first child
INodewith the given header from the currentINode. - Löst aus:
RuntimeException- if the currentINodedoes not contain a childINodewith the given header.
-
getStoredSingleChildNode
N getStoredSingleChildNode() -
getSingleChildNodeAsBoolean
boolean getSingleChildNodeAsBoolean()- Gibt zurück:
- the boolean the single child
INodeof the currentINoderepresents. - Löst aus:
RuntimeException- if the currentINodedoes not contain childINodes or contains several childINodes.RuntimeException- if the single childINodeof the currentINodedoes not represent a boolean.
-
getSingleChildNodeAsDouble
double getSingleChildNodeAsDouble()- Gibt zurück:
- the double the single child
INodeof the currentINoderepresents. - Löst aus:
RuntimeException- if the currentINodedoes not contain childINodes or contains several childINodes.RuntimeException- if the single childINodeof the currentINodedoes not represent a double.
-
getSingleChildNodeAsInt
int getSingleChildNodeAsInt()- Gibt zurück:
- the int the single child
INodeof the currentINoderepresents. - Löst aus:
RuntimeException- if the currentINodedoes not contain childINodes or contains several childINodes.RuntimeException- if the single childINodeof the currentINodedoes not represent an int.
-
getSingleChildNodeHeader
String getSingleChildNodeHeader()- Gibt zurück:
- the header of the single child
INodeof the currentINode. - Löst aus:
RuntimeException- if the currentINodedoes not contain childINodes or contains several childINodes.RuntimeException- if the single childINodeof the currentINodedoes not have a header.
-
toBoolean
boolean toBoolean()- Gibt zurück:
- the boolean the current
INoderepresents. - Löst aus:
RuntimeException- if the currentINodedoes not represent a boolean.
-
toDouble
double toDouble()- Gibt zurück:
- the double the current
INoderepresents. - Löst aus:
RuntimeException- if the currentINodedoes not represent a double.
-
toFormattedString
String toFormattedString() -
toInt
int toInt()- Gibt zurück:
- the int the current
INoderepresents. - Löst aus:
RuntimeException- if the currentINodedoes not represent an int.
-
toXml
IXmlNode<?> toXml()
-