Class CharArrayNodeLeafVoidValue
java.lang.Object
com.googlecode.concurrenttrees.radix.node.concrete.chararray.CharArrayNodeLeafVoidValue
- All Implemented Interfaces:
Node
,NodeCharacterProvider
,Serializable
Stores only incoming edge as a
char[]
.
Returns VoidValue
for the value. Does not store any outgoing edges.- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns all characters of the "edge" encoded in this node, belonging to the connection from a parent node to this node.Returns the first character of the "edge" encoded in this node, belonging to the connection from a parent node to this node.getOutgoingEdge
(Character edgeFirstCharacter) Returns the child of this node whose edge starts with the given first character.Returns a read-only list of the child nodes to which this node has outgoing edges, i.e.getValue()
Returns a value object which has been associated with a key and which is stored in this node, or returnsnull
if no value is stored in this node.toString()
void
updateOutgoingEdge
(Node childNode) Updates the child node reference for a given edge (identified by its first character) to point to a different child node.
-
Field Details
-
incomingEdgeCharArray
private final char[] incomingEdgeCharArray
-
-
Constructor Details
-
CharArrayNodeLeafVoidValue
-
-
Method Details
-
getIncomingEdge
Description copied from interface:Node
Returns all characters of the "edge" encoded in this node, belonging to the connection from a parent node to this node.- Specified by:
getIncomingEdge
in interfaceNode
- Returns:
- All characters of the "edge" encoded in this node
-
getIncomingEdgeFirstCharacter
Description copied from interface:Node
Returns the first character of the "edge" encoded in this node, belonging to the connection from a parent node to this node.- Specified by:
getIncomingEdgeFirstCharacter
in interfaceNode
- Specified by:
getIncomingEdgeFirstCharacter
in interfaceNodeCharacterProvider
- Returns:
- The first character of the "edge" encoded in this node
-
getValue
Description copied from interface:Node
Returns a value object which has been associated with a key and which is stored in this node, or returnsnull
if no value is stored in this node. -
getOutgoingEdge
Description copied from interface:Node
Returns the child of this node whose edge starts with the given first character. This read must be performed atomically, in relation to writes made viaNode.updateOutgoingEdge(Node)
.- Specified by:
getOutgoingEdge
in interfaceNode
- Parameters:
edgeFirstCharacter
- The first character of the edge for which the associated child node is required- Returns:
- The child of this node whose edge starts with the given first character, or
null
if this node has no such outgoing edge
-
updateOutgoingEdge
Description copied from interface:Node
Updates the child node reference for a given edge (identified by its first character) to point to a different child node. The first character of the given child node's edge must match the first character of an existing outgoing edge from this node. This write must be performed atomically, in relation to reads made viaNode.getOutgoingEdge(Character)
.- Specified by:
updateOutgoingEdge
in interfaceNode
- Parameters:
childNode
- The new child node to associated with this edge
-
getOutgoingEdges
Description copied from interface:Node
Returns a read-only list of the child nodes to which this node has outgoing edges, i.e. child nodes which have incoming edges from this node. It is intended that this method will be used for copying/cloning nodes.- Specified by:
getOutgoingEdges
in interfaceNode
- Returns:
- A read-only list of the child nodes to which this node has outgoing edges
-
toString
-