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 IChainedNodes -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 TypMethodeBeschreibungbooleangetChildNodeAtOneBasedIndex(int oneBasedIndex) intIContainer<? extends IChainedNode> getFirstChildNodeWithHeader(String header) doubleintbooleandoubletoDouble()inttoInt()INode<?> toNode()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
-
containsChildNodes
boolean containsChildNodes()- Gibt zurück:
- true if the current
IChainedNodecontains child nodes.
-
getChildNodeAtOneBasedIndex
- Parameter:
oneBasedIndex-- Gibt zurück:
- the child node of the current
IChainedNodeat the given oneBasedIndex . - Löst aus:
RuntimeException- if the currentIChainedNodedoes not contain a child node at the given oneBasedIndex.
-
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 currentIChainedNodedoes 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 currentIChainedNodedoes 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 currentIChainedNodedoes not contain a child node or contains multiple 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 currentIChainedNodedoes not contain a child node or contains multiple child nodes.RuntimeException- if the single child node of the currentIChainedNodedoes not have a header.
-
getSingleChildNodeAsDouble
double getSingleChildNodeAsDouble()- Gibt zurück:
- a double representation of the single child node of the current
IChainedNode. - Löst aus:
RuntimeException- if the currentIChainedNodedoes not contain a child nodes or contains multiple child nodes.RuntimeException- if the single child node of the currentIChainedNodedoes not have a header.RuntimeException- if the header of the single child node of the currentIChainedNodedoes not represent a double.
-
getSingleChildNodeAsInt
int getSingleChildNodeAsInt()- Gibt zurück:
- a int representation of the single child node of the current
IChainedNode. - Löst aus:
RuntimeException- if the currentIChainedNodedoes not contain a child node or contains multiple child nodes.RuntimeException- if the single child node of the currentIChainedNodedoes not have a header.RuntimeException- if the header of the single child node of the currentIChainedNodedoes not represent an int.
-
getSingleChildNodeAsString
String getSingleChildNodeAsString()- Gibt zurück:
- a
Stringrepresentation of the single child node of the currentIChainedNode. - Löst aus:
RuntimeException- if the currentIChainedNodedoes not contain a child node or contains multiple child nodes.
-
hasNextNode
boolean hasNextNode()- Gibt zurück:
- true if the current
IChainedNodehas a next node.
-
toDouble
double toDouble()- Gibt zurück:
- the double the current
IChainedNoderepresents. - Löst aus:
RuntimeException- if the currentIChainedNodedoes not represent a double.
-
toInt
int toInt()- Gibt zurück:
- the int the current
IChainedNoderepresents. - Löst aus:
RuntimeException- if the currentIChainedNodedoes not represent an int.
-
toNode
INode<?> toNode()AIChainedNoderepresents aINodeif: -TheIChainedNodedoes not have a next node. -Each child nodes of theIChainedNoderepresents aINode.- Gibt zurück:
- a
INoderepresentation of the currentIChainedNode. - Löst aus:
RuntimeException- if the currentIChainedNodedoes not represent aINode.
-