|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.concurrenttrees.radix.node.util.NodeUtil
public class NodeUtil
Static utility methods useful when implementing Nodes.
| Method Summary | |
|---|---|
static int |
binarySearchForEdge(AtomicReferenceArray<Node> childNodes,
Character edgeFirstCharacter)
Returns the index of the node in the given AtomicReferenceArray whose edge starts with the given
first character. |
static void |
ensureNoDuplicateEdges(List<Node> nodes)
Throws an exception if any nodes in the given list represent edges having the same first character. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static int binarySearchForEdge(AtomicReferenceArray<Node> childNodes,
Character edgeFirstCharacter)
AtomicReferenceArray whose edge starts with the given
first character.
This method expects that some constraints are enforced on the AtomicReferenceArray:
childNodes - An AtomicReferenceArray of Node objects, which is used in accordance with
the constraints documented in this methodedgeFirstCharacter - The first character of the edge for which the associated node is required
public static void ensureNoDuplicateEdges(List<Node> nodes)
nodes - The list of nodes to validate
IllegalStateException - If a duplicate edge is detected
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||