Schnittstelle INode<N extends INode<N>>
- Typparameter:
N
- is the type of aINode
.
- Alle Superschnittstellen:
BlanknessRequestable
,IOptionalHeaderHolder
- Alle bekannten Unterschnittstellen:
IMutableNode<MN>
- Alle bekannten Implementierungsklassen:
BaseMutableNode
,BaseNode
,FileNode
,MutableNode
,Node
A
INode
has the following attributes. -0 or 1 header -an arbitrary
number of child INode
s
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) boolean
boolean
containsChildNodeThat
(Predicate<INode<?>> selector) boolean
containsChildNodeWithHeader
(String header) boolean
int
getOptionalStoredFirstChildNodeThat
(Predicate<INode<?>> selector) boolean
double
int
getStoredChildNodeAt1BasedIndex
(int p1BasedIndex) getStoredChildNodesThat
(Predicate<INode<?>> selector) getStoredChildNodesWithHeader
(String header) getStoredFirstChildNodeThat
(Predicate<INode<?>> selector) boolean
double
toDouble()
int
toInt()
IXmlNode
<?> toXml()
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.stateapi.staterequestapi.BlanknessRequestable
isBlank
Von Schnittstelle geerbte Methoden ch.nolix.coreapi.attributeapi.optionalattributeapi.IOptionalHeaderHolder
getHeader, getHeaderOrEmptyString, getOptionalHeader, hasHeader, hasHeader
-
Methodendetails
-
asWithHeader
- Parameter:
header
-- Gibt zurück:
- a new
INode
that is a copy of the currentINode
with 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
INode
s of the currentINode
. - Löst aus:
RuntimeException
- if one of the childINode
s of the currentINode
does not have a header.
-
getOptionalStoredFirstChildNodeThat
-
getStoredChildNodeAt1BasedIndex
- Parameter:
p1BasedIndex
-- Gibt zurück:
- the child
INode
at the given p1BasedIndex from the currentINode
. - Löst aus:
RuntimeException
- if the given index is not positive.RuntimeException
- if the currentINode
does not contain a childINode
at the given p1BasedIndex.
-
getStoredChildNodes
IContainer<N> getStoredChildNodes() -
getStoredChildNodesThat
-
getStoredChildNodesWithHeader
-
getStoredFirstChildNode
N getStoredFirstChildNode()- Gibt zurück:
- the first child
INode
from the currentINode
. - Löst aus:
RuntimeException
- if the currentINode
does not contain childINode
s.
-
getStoredFirstChildNodeThat
- Parameter:
selector
-- Gibt zurück:
- the first child
INode
the given selector selects from the currentINode
. - Löst aus:
RuntimeException
- if the currentINode
does not contain a childINode
the given selector selects.
-
getStoredFirstChildNodeWithHeader
- Parameter:
header
-- Gibt zurück:
- the first child
INode
with the given header from the currentINode
. - Löst aus:
RuntimeException
- if the currentINode
does not contain a childINode
with the given header.
-
getStoredSingleChildNode
N getStoredSingleChildNode() -
getSingleChildNodeAsBoolean
boolean getSingleChildNodeAsBoolean()- Gibt zurück:
- the boolean the single child
INode
of the currentINode
represents. - Löst aus:
RuntimeException
- if the currentINode
does not contain childINode
s or contains several childINode
s.RuntimeException
- if the single childINode
of the currentINode
does not represent a boolean.
-
getSingleChildNodeAsDouble
double getSingleChildNodeAsDouble()- Gibt zurück:
- the double the single child
INode
of the currentINode
represents. - Löst aus:
RuntimeException
- if the currentINode
does not contain childINode
s or contains several childINode
s.RuntimeException
- if the single childINode
of the currentINode
does not represent a double.
-
getSingleChildNodeAsInt
int getSingleChildNodeAsInt()- Gibt zurück:
- the int the single child
INode
of the currentINode
represents. - Löst aus:
RuntimeException
- if the currentINode
does not contain childINode
s or contains several childINode
s.RuntimeException
- if the single childINode
of the currentINode
does not represent an int.
-
getSingleChildNodeHeader
String getSingleChildNodeHeader()- Gibt zurück:
- the header of the single child
INode
of the currentINode
. - Löst aus:
RuntimeException
- if the currentINode
does not contain childINode
s or contains several childINode
s.RuntimeException
- if the single childINode
of the currentINode
does not have a header.
-
toBoolean
boolean toBoolean()- Gibt zurück:
- the boolean the current
INode
represents. - Löst aus:
RuntimeException
- if the currentINode
does not represent a boolean.
-
toDouble
double toDouble()- Gibt zurück:
- the double the current
INode
represents. - Löst aus:
RuntimeException
- if the currentINode
does not represent a double.
-
toFormattedString
String toFormattedString() -
toInt
int toInt()- Gibt zurück:
- the int the current
INode
represents. - Löst aus:
RuntimeException
- if the currentINode
does not represent an int.
-
toXml
IXmlNode<?> toXml()
-