Schnittstelle IChainedNode
- Alle Superschnittstellen:
BlanknessRequestable
,IOptionalHeaderHolder
- Alle bekannten Implementierungsklassen:
ChainedNode
A
IChainedNode
has the following attributes. -0 or 1 header -an
arbitrary number of child IChainedNode
s -0 or 1 next
IChainedNode
A IChainedNode
that does not have a header, does not contain
attributes and does not have a next IChainedNode
is blank.
A IChainedNode
is not mutable.- Version:
- 2022-07-05
- Autor:
- Silvan Wyss
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
getChildNodeAt1BasedIndex
(int p1BasedIndex) int
IContainer
<? extends IChainedNode> getFirstChildNodeWithHeader
(String header) boolean
double
toDouble()
int
toInt()
INode
<?> toNode()
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
-
containsChildNodes
boolean containsChildNodes()- Gibt zurück:
- true if the current
IChainedNode
contains child nodes.
-
getChildNodeAt1BasedIndex
- Parameter:
p1BasedIndex
-- Gibt zurück:
- the child node of the current
IChainedNode
at the given p1BasedIndex . - Löst aus:
RuntimeException
- if the currentIChainedNode
does not contain a child node at the given p1BasedIndex.
-
getChildNodeCount
int getChildNodeCount()- Gibt zurück:
- the number of child nodes of the current
IChainedNode
.
-
getChildNodes
IContainer<? extends IChainedNode> getChildNodes()- Gibt zurück:
- the child nodes of the current
IChainedNode
.
-
getFirstChildNodeWithHeader
- Parameter:
header
-- Gibt zurück:
- the first child node with the given header from the current
IChainedNode
. - Löst aus:
RuntimeException
- if the currentIChainedNode
does not contain a child node with the given header.
-
getNextNode
IChainedNode getNextNode()- Gibt zurück:
- the next node of the current
IChainedNode
. - Löst aus:
RuntimeException
- if the currentIChainedNode
does not have a next node.
-
getSingleChildNode
IChainedNode getSingleChildNode()- Gibt zurück:
- the single child node of the current
IChainedNode
. - Löst aus:
RuntimeException
- if the currentIChainedNode
does not contain child nodes or contains several child nodes.
-
getSingleChildNodeHeader
String getSingleChildNodeHeader()- Gibt zurück:
- the header of the single child node of the current
IChainedNode
. - Löst aus:
RuntimeException
- if the currentIChainedNode
does not contain child nodes or contains several child nodes.RuntimeException
- if the single child node of the currentIChainedNode
does not have a header.
-
hasNextNode
boolean hasNextNode()- Gibt zurück:
- true if the current
IChainedNode
has a next node.
-
toDouble
double toDouble()- Gibt zurück:
- the double the current
IChainedNode
represents. - Löst aus:
RuntimeException
- if the currentIChainedNode
does not represent a double.
-
toInt
int toInt()- Gibt zurück:
- the int the current
IChainedNode
represents. - Löst aus:
RuntimeException
- if the currentIChainedNode
does not represent an int.
-
toNode
INode<?> toNode()AIChainedNode
represents aINode
if: -TheIChainedNode
does not have a next node. -Each child nodes of theIChainedNode
represents aINode
.- Gibt zurück:
- a
INode
representation of the currentIChainedNode
. - Löst aus:
RuntimeException
- if the currentIChainedNode
does not represent aINode
.
-