- java.lang.Object
-
- inet.ipaddr.format.util.BinaryTreeNode<E>
-
- inet.ipaddr.format.util.AddressTrie.TrieNode<IPv6Address>
-
- inet.ipaddr.ipv6.IPv6AddressTrie.IPv6TrieNode
-
- All Implemented Interfaces:
AddressTrieOps<IPv6Address>,TreeOps<IPv6Address>,java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<IPv6Address>
- Enclosing class:
- IPv6AddressTrie
public static class IPv6AddressTrie.IPv6TrieNode extends AddressTrie.TrieNode<IPv6Address>
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class inet.ipaddr.format.util.BinaryTreeNode
BinaryTreeNode.CachingIterator<N extends BinaryTreeNode<E>,E,C>
-
Nested classes/interfaces inherited from interface inet.ipaddr.format.util.AddressTrieOps
AddressTrieOps.AddressTrieAddOps<E extends Address>, AddressTrieOps.AssociativeAddressTrieOps<K extends Address,V>, AddressTrieOps.AssociativeAddressTriePutOps<K extends Address,V>
-
-
Constructor Summary
Constructors Constructor Description IPv6TrieNode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Iterator<IPv6AddressTrie.IPv6TrieNode>allNodeIterator(boolean forward)Iterates through all the nodes of the sub-tree with this node as the root, in forward or reverse tree order.java.util.Spliterator<IPv6AddressTrie.IPv6TrieNode>allNodeSpliterator(boolean forward)Creates aSpliteratorover the nodes in forward or reverse natural tree order.IPv6AddressTrieasNewTrie()Creates a new sub-trie, copying the nodes starting with this node as root.java.util.Iterator<IPv6AddressTrie.IPv6TrieNode>blockSizeAllNodeIterator(boolean lowerSubNodeFirst)Iterates all the nodes, ordered by keys from largest prefix blocks to smallest and then to individual addresses, in the sub-trie with this node as the root.<C> BinaryTreeNode.CachingIterator<IPv6AddressTrie.IPv6TrieNode,IPv6Address,C>blockSizeCachingAllNodeIterator()Iterates all nodes, ordered by keys from largest prefix blocks to smallest and then to individual addresses, in the sub-trie with this node as the root.java.util.Iterator<IPv6AddressTrie.IPv6TrieNode>blockSizeNodeIterator(boolean lowerSubNodeFirst)Iterates the added nodes, ordered by keys from largest prefix blocks to smallest and then to individual addresses, in the sub-trie with this node as the root.IPv6AddressTrie.IPv6TrieNodeceilingAddedNode(IPv6Address addr)Returns the added node whose address is the lowest address greater than or equal to the given address.IPv6AddressTrie.IPv6TrieNodeclone()Clones the node.IPv6AddressTrie.IPv6TrieNodecloneTree()Clones the sub-tree starting with this node as root.java.util.Iterator<IPv6AddressTrie.IPv6TrieNode>containedFirstAllNodeIterator(boolean forwardSubNodeOrder)Returns an iterator that does a post-order binary tree traversal.java.util.Iterator<IPv6AddressTrie.IPv6TrieNode>containedFirstIterator(boolean forwardSubNodeOrder)Returns an iterator that does a post-order binary tree traversal of the added nodes.<C> BinaryTreeNode.CachingIterator<IPv6AddressTrie.IPv6TrieNode,IPv6Address,C>containingFirstAllNodeIterator(boolean forwardSubNodeOrder)Returns an iterator that does a pre-order binary tree traversal.java.util.Iterator<IPv6AddressTrie.IPv6TrieNode>containingFirstIterator(boolean forwardSubNodeOrder)Returns an iterator that does a pre-order binary tree traversal of the added nodes.IPv6AddressTrie.IPv6TrieNodeelementsContainedBy(IPv6Address addr)Checks if a part of this trie is contained by the given prefix block subnet or individual address.IPv6AddressTrie.IPv6TrieNodeelementsContaining(IPv6Address addr)Finds the added subnets and/or addresses in the trie that contain the given individual address or prefix block subnet.booleanequals(java.lang.Object o)Returns whether the key values match those of the given nodeIPv6AddressTrie.IPv6TrieNodefirstAddedNode()Returns the first (lowest valued) added node in the sub-tree originating from this node, or null if there are no added entries in this tree or sub-treeIPv6AddressTrie.IPv6TrieNodefirstNode()Returns the first (lowest valued) node in the sub-tree originating from this node.IPv6AddressTrie.IPv6TrieNodefloorAddedNode(IPv6Address addr)Returns the added node whose address is the highest address less than or equal to the given address.IPv6AddressTrie.IPv6TrieNodegetAddedNode(IPv6Address addr)Gets trie nodes representing added elements.IPv6AddressTrie.IPv6TrieNodegetLowerSubNode()Returns the sub node whose address is smallest in valueIPv6AddressTrie.IPv6TrieNodegetNode(IPv6Address addr)Gets the node corresponding to the given address, returns null if not such element exists.IPv6AddressTrie.IPv6TrieNodegetParent()Returns the node for the subnet block containing this node.IPv6AddressTrie.IPv6TrieNodegetUpperSubNode()Returns the sub-node whose address is largest in valueIPv6AddressTrie.IPv6TrieNodehigherAddedNode(IPv6Address addr)Returns the added node whose address is the lowest address strictly greater than the given address.IPv6AddressTrie.IPv6TrieNodelastAddedNode()Returns the last (highest valued) added node in the sub-tree originating from this node, or null if there are no added entries in this tree or sub-treeIPv6AddressTrie.IPv6TrieNodelastNode()Returns the last (highest valued) node in the sub-tree originating from this node.IPv6AddressTrie.IPv6TrieNodelongestPrefixMatchNode(IPv6Address addr)Finds the containing subnet or address in the trie with the smallest subnet size, which is equivalent to finding the subnet or address with the longest matching prefix.IPv6AddressTrie.IPv6TrieNodelowerAddedNode(IPv6Address addr)Returns the added node whose address is the highest address strictly less than the given address.IPv6AddressTrie.IPv6TrieNodenextAddedNode()Returns the next node in the tree that is an added node, following the tree order, or null if there is no such node.IPv6AddressTrie.IPv6TrieNodenextNode()Returns the node that follows this node following the tree orderjava.util.Iterator<IPv6AddressTrie.IPv6TrieNode>nodeIterator(boolean forward)Iterates through the added nodes of the sub-tree with this node as the root, in forward or reverse tree order.java.util.Spliterator<IPv6AddressTrie.IPv6TrieNode>nodeSpliterator(boolean forward)Creates aSpliteratorover the added nodes in forward or reverse natural tree order.IPv6AddressTrie.IPv6TrieNodepreviousAddedNode()Returns the previous node in the tree that is an added node, following the tree order in reverse, or null if there is no such node.IPv6AddressTrie.IPv6TrieNodepreviousNode()Returns the node that precedes this node following the tree order.IPv6AddressTrie.IPv6TrieNoderemoveElementsContainedBy(IPv6Address addr)Removes any single address or prefix block subnet from the trie that is contained in the given individual address or prefix block subnet.-
Methods inherited from class inet.ipaddr.format.util.AddressTrie.TrieNode
ceiling, contains, descendingSpliterator, elementContains, floor, higher, longestPrefixMatch, lower, remove, shortestPrefixMatch, shortestPrefixMatchNode, spliterator
-
Methods inherited from class inet.ipaddr.format.util.BinaryTreeNode
clear, descendingIterator, getKey, hashCode, isAdded, isEmpty, isLeaf, isRoot, iterator, nodeSize, remove, setAdded, size, toString, toTreeString, treeEquals, treeHashCode
-
Methods inherited from interface inet.ipaddr.format.util.TreeOps
descendingIterator, iterator
-
-
-
-
Method Detail
-
getUpperSubNode
public IPv6AddressTrie.IPv6TrieNode getUpperSubNode()
Description copied from class:AddressTrie.TrieNodeReturns the sub-node whose address is largest in value- Overrides:
getUpperSubNodein classAddressTrie.TrieNode<IPv6Address>- Returns:
-
getLowerSubNode
public IPv6AddressTrie.IPv6TrieNode getLowerSubNode()
Description copied from class:AddressTrie.TrieNodeReturns the sub node whose address is smallest in value- Overrides:
getLowerSubNodein classAddressTrie.TrieNode<IPv6Address>- Returns:
-
getParent
public IPv6AddressTrie.IPv6TrieNode getParent()
Description copied from class:AddressTrie.TrieNodeReturns the node for the subnet block containing this node.- Overrides:
getParentin classAddressTrie.TrieNode<IPv6Address>- Returns:
-
removeElementsContainedBy
public IPv6AddressTrie.IPv6TrieNode removeElementsContainedBy(IPv6Address addr)
Description copied from interface:AddressTrieOpsRemoves any single address or prefix block subnet from the trie that is contained in the given individual address or prefix block subnet.Goes further than
AddressTrieOps.remove(Address), not requiring a match to an inserted node, and also removing all the sub-nodes of any removed node or sub-node.For example, after inserting 1.2.3.0 and 1.2.3.1, passing 1.2.3.0/31 to
AddressTrieOps.removeElementsContainedBy(Address)will remove them both, whileAddressTrieOps.remove(Address)will remove nothing. After inserting 1.2.3.0/31, then #remove(Address) will remove 1.2.3.0/31, but will leave 1.2.3.0 and 1.2.3.1 in the trie.It cannot partially delete a node, such as deleting a single address from a prefix block represented by a node. It can only delete the whole node if the whole address or block represented by that node is contained in the given address or block.
If the given address is not a single address nor prefix block, then this method throws IllegalArgumentException.
If not a single address nor prefix block, the
Partitionclass can be used to convert the address before calling this method. SeeAddressTrieOps.AddressTrieAddOps.add(Address)for more details.Returns the root node of the subtrie that was removed from the trie, or null if nothing was removed.
- Specified by:
removeElementsContainedByin interfaceAddressTrieOps<IPv6Address>- Overrides:
removeElementsContainedByin classAddressTrie.TrieNode<IPv6Address>- Returns:
-
elementsContainedBy
public IPv6AddressTrie.IPv6TrieNode elementsContainedBy(IPv6Address addr)
Description copied from interface:AddressTrieOpsChecks if a part of this trie is contained by the given prefix block subnet or individual address.If the given address is not a single address nor prefix block, then this method throws IllegalArgumentException.
If not a single address nor prefix block, the
Partitionclass can be used to convert the address before calling this method. SeeAddressTrieOps.AddressTrieAddOps.add(Address)for more details.Returns the root node of the contained subtrie, or null if no subtrie is contained. The node returned need not be an "added" node, see
BinaryTreeNode.isAdded()for more details on added nodes. The returned subtrie is backed by this trie, so changes in this trie are reflected in those nodes and vice-versa.- Specified by:
elementsContainedByin interfaceAddressTrieOps<IPv6Address>- Overrides:
elementsContainedByin classAddressTrie.TrieNode<IPv6Address>- Returns:
-
elementsContaining
public IPv6AddressTrie.IPv6TrieNode elementsContaining(IPv6Address addr)
Description copied from interface:AddressTrieOpsFinds the added subnets and/or addresses in the trie that contain the given individual address or prefix block subnet.If the given address is not a single address nor prefix block, then this method throws IllegalArgumentException.
If not a single address nor prefix block, the
Partitionclass can be used to convert the address before calling this method. SeeAddressTrieOps.AddressTrieAddOps.add(Address)for more details.Returns a list of the nodes for prefix block subnets and addresses from the trie that contain the address or block. The list consists only of added nodes, see
BinaryTreeNode.isAdded()for more details on added nodes. The list is constructed as a trie in which each parent node has only one sub-node.Use
AddressTrieOps.elementContains(Address)to check for the existence of a containing address.- Specified by:
elementsContainingin interfaceAddressTrieOps<IPv6Address>- Overrides:
elementsContainingin classAddressTrie.TrieNode<IPv6Address>- Returns:
-
longestPrefixMatchNode
public IPv6AddressTrie.IPv6TrieNode longestPrefixMatchNode(IPv6Address addr)
Description copied from interface:AddressTrieOpsFinds the containing subnet or address in the trie with the smallest subnet size, which is equivalent to finding the subnet or address with the longest matching prefix. Returns the node corresponding to that subnet.If the given address is not a single address nor prefix block, then this method throws IllegalArgumentException.
If not a single address nor prefix block, the
Partitionclass can be used to convert the address before calling this method. SeeAddressTrieOps.AddressTrieAddOps.add(Address)for more details.Returns null if no added subnet or address contains the given argument.
Use
AddressTrieOps.elementContains(Address)to check for the existence of a containing address.
To get all the containing addresses, useAddressTrieOps.elementsContaining(Address).
UseAddressTrieOps.longestPrefixMatch(Address)to get the address corresponding to the result of this method.- Specified by:
longestPrefixMatchNodein interfaceAddressTrieOps<IPv6Address>- Overrides:
longestPrefixMatchNodein classAddressTrie.TrieNode<IPv6Address>- Returns:
-
getAddedNode
public IPv6AddressTrie.IPv6TrieNode getAddedNode(IPv6Address addr)
Description copied from interface:AddressTrieOpsGets trie nodes representing added elements.Use
AddressTrieOps.contains(Address)to check for the existence of a given address in the trie, as well asAddressTrieOps.getNode(Address)to search for all nodes including those not-added but also auto-generated nodes for subnet blocks.- Returns:
-
getNode
public IPv6AddressTrie.IPv6TrieNode getNode(IPv6Address addr)
Description copied from interface:AddressTrieOpsGets the node corresponding to the given address, returns null if not such element exists.If added is true, returns only nodes representing added elements, otherwise returns any node, including a prefix block that was not added.
If the given address is not a single address nor prefix block, then this method throws IllegalArgumentException.
If not a single address nor prefix block, the
Partitionclass can be used to convert the address before calling this method. SeeAddressTrieOps.AddressTrieAddOps.add(Address)for more details.- Specified by:
getNodein interfaceAddressTrieOps<IPv6Address>- Overrides:
getNodein classAddressTrie.TrieNode<IPv6Address>- Returns:
- See Also:
AddressTrieOps.contains(Address)
-
nodeIterator
public java.util.Iterator<IPv6AddressTrie.IPv6TrieNode> nodeIterator(boolean forward)
Description copied from class:BinaryTreeNodeIterates through the added nodes of the sub-tree with this node as the root, in forward or reverse tree order.- Specified by:
nodeIteratorin interfaceAddressTrieOps<IPv6Address>- Specified by:
nodeIteratorin interfaceTreeOps<IPv6Address>- Overrides:
nodeIteratorin classAddressTrie.TrieNode<IPv6Address>- Parameters:
forward- if true, goes in ascending order, otherwise descending- Returns:
-
allNodeIterator
public java.util.Iterator<IPv6AddressTrie.IPv6TrieNode> allNodeIterator(boolean forward)
Description copied from class:BinaryTreeNodeIterates through all the nodes of the sub-tree with this node as the root, in forward or reverse tree order.- Specified by:
allNodeIteratorin interfaceAddressTrieOps<IPv6Address>- Specified by:
allNodeIteratorin interfaceTreeOps<IPv6Address>- Overrides:
allNodeIteratorin classAddressTrie.TrieNode<IPv6Address>- Parameters:
forward- if true, goes in ascending order, otherwise descending- Returns:
-
blockSizeNodeIterator
public java.util.Iterator<IPv6AddressTrie.IPv6TrieNode> blockSizeNodeIterator(boolean lowerSubNodeFirst)
Description copied from class:AddressTrie.TrieNodeIterates the added nodes, ordered by keys from largest prefix blocks to smallest and then to individual addresses, in the sub-trie with this node as the root.This iterator supports the
Iterator.remove()operation.- Overrides:
blockSizeNodeIteratorin classAddressTrie.TrieNode<IPv6Address>- Parameters:
lowerSubNodeFirst- if true, for blocks of equal size the lower is first, otherwise the reverse order- Returns:
-
blockSizeAllNodeIterator
public java.util.Iterator<IPv6AddressTrie.IPv6TrieNode> blockSizeAllNodeIterator(boolean lowerSubNodeFirst)
Description copied from class:AddressTrie.TrieNodeIterates all the nodes, ordered by keys from largest prefix blocks to smallest and then to individual addresses, in the sub-trie with this node as the root.This iterator supports the
Iterator.remove()operation.- Overrides:
blockSizeAllNodeIteratorin classAddressTrie.TrieNode<IPv6Address>- Parameters:
lowerSubNodeFirst- if true, for blocks of equal size the lower is first, otherwise the reverse order- Returns:
-
blockSizeCachingAllNodeIterator
public <C> BinaryTreeNode.CachingIterator<IPv6AddressTrie.IPv6TrieNode,IPv6Address,C> blockSizeCachingAllNodeIterator()
Description copied from class:AddressTrie.TrieNodeIterates all nodes, ordered by keys from largest prefix blocks to smallest and then to individual addresses, in the sub-trie with this node as the root.- Overrides:
blockSizeCachingAllNodeIteratorin classAddressTrie.TrieNode<IPv6Address>- Returns:
-
containingFirstIterator
public java.util.Iterator<IPv6AddressTrie.IPv6TrieNode> containingFirstIterator(boolean forwardSubNodeOrder)
Description copied from interface:TreeOpsReturns an iterator that does a pre-order binary tree traversal of the added nodes. All added nodes will be visited before their added sub-nodes. For an address trie this means added containing subnet blocks will be visited before their added contained addresses and subnet blocks.This iterator supports the
Iterator.remove()operation.See the docs for
TreeOpsfor more details on the ordering.- Specified by:
containingFirstIteratorin interfaceAddressTrieOps<IPv6Address>- Specified by:
containingFirstIteratorin interfaceTreeOps<IPv6Address>- Overrides:
containingFirstIteratorin classAddressTrie.TrieNode<IPv6Address>- Parameters:
forwardSubNodeOrder- if true, a left sub-node will be visited before the right sub-node of the same parent node.- Returns:
-
containingFirstAllNodeIterator
public <C> BinaryTreeNode.CachingIterator<IPv6AddressTrie.IPv6TrieNode,IPv6Address,C> containingFirstAllNodeIterator(boolean forwardSubNodeOrder)
Description copied from interface:TreeOpsReturns an iterator that does a pre-order binary tree traversal. All nodes will be visited before their sub-nodes. For an address trie this means containing subnet blocks will be visited before their contained addresses and subnet blocks.This iterator supports the
Iterator.remove()operation.Once a given node is visited, the iterator allows you to cache an object corresponding to the lower or upper sub-node that can be retrieved when you later visit that sub-node. That allows you to provide iteration context from a parent to its sub-nodes when iterating. The caching and retrieval is done in constant-time and linear space (proportional to tree size).
Here is an example showing usage of the caching. Consider this recursive code doing a pre-order traversal:
The following iterative code provides the same functionality:IPv6AddressTrie ipv6Tree = ...; visitRecursive(ipv6Tree.getRoot(), null); static <E> void visitRecursive(BinaryTreeNode<E> node, String direction) { if(direction == null) { direction = "root"; } System.out.println("visited " + direction + " " + node); BinaryTreeNode<E> sub = node.getLowerSubNode(); if(sub != null) { visitRecursive(sub, direction + " left"); } sub = node.getUpperSubNode(); if(sub != null) { visitRecursive(sub, direction + " right"); } }visitIterative(ipv6Tree.getRoot()); static <E> void visitIterative(BinaryTreeNode<E> node) { CachingIterator<? extends BinaryTreeNode<E>, E, String>iterator = node.containingFirstAllNodeIterator(true); while(iterator.hasNext()) { BinaryTreeNode<E> next = iterator.next(); String direction = iterator.getCached(); if(direction == null) { direction = "root"; } System.out.println("visited " + direction + " " + next); iterator.cacheWithLowerSubNode(direction + " left"); iterator.cacheWithUpperSubNode(direction + " right"); } }See
TreeOpsfor more details on the ordering.- Specified by:
containingFirstAllNodeIteratorin interfaceAddressTrieOps<IPv6Address>- Specified by:
containingFirstAllNodeIteratorin interfaceTreeOps<IPv6Address>- Overrides:
containingFirstAllNodeIteratorin classAddressTrie.TrieNode<IPv6Address>- Parameters:
forwardSubNodeOrder- if true, a left sub-node will be visited before the right sub-node of the same parent node.- Returns:
-
containedFirstIterator
public java.util.Iterator<IPv6AddressTrie.IPv6TrieNode> containedFirstIterator(boolean forwardSubNodeOrder)
Description copied from interface:TreeOpsReturns an iterator that does a post-order binary tree traversal of the added nodes. All added sub-nodes will be visited before their parent nodes. For an address trie this means contained addresses and subnets will be visited before their containing subnet blocks.This iterator supports the
Iterator.remove()operation.See
TreeOpsfor more details on the ordering.- Specified by:
containedFirstIteratorin interfaceAddressTrieOps<IPv6Address>- Specified by:
containedFirstIteratorin interfaceTreeOps<IPv6Address>- Overrides:
containedFirstIteratorin classAddressTrie.TrieNode<IPv6Address>- Parameters:
forwardSubNodeOrder- if true, a left sub-node will be visited before the right sub-node of the same parent node.- Returns:
-
containedFirstAllNodeIterator
public java.util.Iterator<IPv6AddressTrie.IPv6TrieNode> containedFirstAllNodeIterator(boolean forwardSubNodeOrder)
Description copied from interface:TreeOpsReturns an iterator that does a post-order binary tree traversal. All sub-nodes will be visited before their parent nodes. For an address trie this means contained addresses and subnets will be visited before their containing subnet blocks.This iterator does not support the
Iterator.remove()operation. IfIterator.remove()is called it will throwUnsupportedOperationException.See
TreeOpsfor more details on the ordering.- Specified by:
containedFirstAllNodeIteratorin interfaceAddressTrieOps<IPv6Address>- Specified by:
containedFirstAllNodeIteratorin interfaceTreeOps<IPv6Address>- Overrides:
containedFirstAllNodeIteratorin classAddressTrie.TrieNode<IPv6Address>- Parameters:
forwardSubNodeOrder- if true, a left sub-node will be visited before the right sub-node of the same parent node.- Returns:
-
nodeSpliterator
public java.util.Spliterator<IPv6AddressTrie.IPv6TrieNode> nodeSpliterator(boolean forward)
Description copied from interface:TreeOpsCreates aSpliteratorover the added nodes in forward or reverse natural tree order.See
TreeOpsfor more details on the ordering.- Specified by:
nodeSpliteratorin interfaceAddressTrieOps<IPv6Address>- Specified by:
nodeSpliteratorin interfaceTreeOps<IPv6Address>- Overrides:
nodeSpliteratorin classAddressTrie.TrieNode<IPv6Address>- Parameters:
forward- if true, goes in ascending order, otherwise descending- Returns:
-
allNodeSpliterator
public java.util.Spliterator<IPv6AddressTrie.IPv6TrieNode> allNodeSpliterator(boolean forward)
Description copied from interface:TreeOpsCreates aSpliteratorover the nodes in forward or reverse natural tree order.See
TreeOpsfor more details on the ordering.- Specified by:
allNodeSpliteratorin interfaceAddressTrieOps<IPv6Address>- Specified by:
allNodeSpliteratorin interfaceTreeOps<IPv6Address>- Overrides:
allNodeSpliteratorin classAddressTrie.TrieNode<IPv6Address>- Parameters:
forward- if true, goes in ascending order, otherwise descending- Returns:
-
previousAddedNode
public IPv6AddressTrie.IPv6TrieNode previousAddedNode()
Description copied from class:BinaryTreeNodeReturns the previous node in the tree that is an added node, following the tree order in reverse, or null if there is no such node.- Overrides:
previousAddedNodein classAddressTrie.TrieNode<IPv6Address>- Returns:
-
nextAddedNode
public IPv6AddressTrie.IPv6TrieNode nextAddedNode()
Description copied from class:BinaryTreeNodeReturns the next node in the tree that is an added node, following the tree order, or null if there is no such node.- Overrides:
nextAddedNodein classAddressTrie.TrieNode<IPv6Address>- Returns:
-
nextNode
public IPv6AddressTrie.IPv6TrieNode nextNode()
Description copied from class:BinaryTreeNodeReturns the node that follows this node following the tree order- Overrides:
nextNodein classAddressTrie.TrieNode<IPv6Address>- Returns:
-
previousNode
public IPv6AddressTrie.IPv6TrieNode previousNode()
Description copied from class:BinaryTreeNodeReturns the node that precedes this node following the tree order.- Overrides:
previousNodein classAddressTrie.TrieNode<IPv6Address>- Returns:
-
lowerAddedNode
public IPv6AddressTrie.IPv6TrieNode lowerAddedNode(IPv6Address addr)
Description copied from interface:AddressTrieOpsReturns the added node whose address is the highest address strictly less than the given address.- Specified by:
lowerAddedNodein interfaceAddressTrieOps<IPv6Address>- Overrides:
lowerAddedNodein classAddressTrie.TrieNode<IPv6Address>- Returns:
-
floorAddedNode
public IPv6AddressTrie.IPv6TrieNode floorAddedNode(IPv6Address addr)
Description copied from interface:AddressTrieOpsReturns the added node whose address is the highest address less than or equal to the given address.- Specified by:
floorAddedNodein interfaceAddressTrieOps<IPv6Address>- Overrides:
floorAddedNodein classAddressTrie.TrieNode<IPv6Address>- Returns:
-
higherAddedNode
public IPv6AddressTrie.IPv6TrieNode higherAddedNode(IPv6Address addr)
Description copied from interface:AddressTrieOpsReturns the added node whose address is the lowest address strictly greater than the given address.- Specified by:
higherAddedNodein interfaceAddressTrieOps<IPv6Address>- Overrides:
higherAddedNodein classAddressTrie.TrieNode<IPv6Address>- Returns:
-
ceilingAddedNode
public IPv6AddressTrie.IPv6TrieNode ceilingAddedNode(IPv6Address addr)
Description copied from interface:AddressTrieOpsReturns the added node whose address is the lowest address greater than or equal to the given address.- Specified by:
ceilingAddedNodein interfaceAddressTrieOps<IPv6Address>- Overrides:
ceilingAddedNodein classAddressTrie.TrieNode<IPv6Address>- Returns:
-
firstNode
public IPv6AddressTrie.IPv6TrieNode firstNode()
Description copied from class:BinaryTreeNodeReturns the first (lowest valued) node in the sub-tree originating from this node.- Specified by:
firstNodein interfaceAddressTrieOps<IPv6Address>- Overrides:
firstNodein classAddressTrie.TrieNode<IPv6Address>- Returns:
-
lastNode
public IPv6AddressTrie.IPv6TrieNode lastNode()
Description copied from class:BinaryTreeNodeReturns the last (highest valued) node in the sub-tree originating from this node.- Specified by:
lastNodein interfaceAddressTrieOps<IPv6Address>- Overrides:
lastNodein classAddressTrie.TrieNode<IPv6Address>- Returns:
-
firstAddedNode
public IPv6AddressTrie.IPv6TrieNode firstAddedNode()
Description copied from class:BinaryTreeNodeReturns the first (lowest valued) added node in the sub-tree originating from this node, or null if there are no added entries in this tree or sub-tree- Specified by:
firstAddedNodein interfaceAddressTrieOps<IPv6Address>- Overrides:
firstAddedNodein classAddressTrie.TrieNode<IPv6Address>- Returns:
-
lastAddedNode
public IPv6AddressTrie.IPv6TrieNode lastAddedNode()
Description copied from class:BinaryTreeNodeReturns the last (highest valued) added node in the sub-tree originating from this node, or null if there are no added entries in this tree or sub-tree- Specified by:
lastAddedNodein interfaceAddressTrieOps<IPv6Address>- Overrides:
lastAddedNodein classAddressTrie.TrieNode<IPv6Address>- Returns:
-
asNewTrie
public IPv6AddressTrie asNewTrie()
Description copied from class:AddressTrie.TrieNodeCreates a new sub-trie, copying the nodes starting with this node as root. The nodes are copies of the nodes in this sub-trie, but their keys and values are not copies.- Overrides:
asNewTriein classAddressTrie.TrieNode<IPv6Address>
-
cloneTree
public IPv6AddressTrie.IPv6TrieNode cloneTree()
Description copied from class:BinaryTreeNodeClones the sub-tree starting with this node as root. The nodes are cloned, but their keys and values are not cloned.- Overrides:
cloneTreein classAddressTrie.TrieNode<IPv6Address>
-
clone
public IPv6AddressTrie.IPv6TrieNode clone()
Description copied from class:BinaryTreeNodeClones the node. Keys remain the same, but the parent node and the lower and upper sub-nodes are all set to null.- Overrides:
clonein classAddressTrie.TrieNode<IPv6Address>
-
equals
public boolean equals(java.lang.Object o)
Description copied from class:BinaryTreeNodeReturns whether the key values match those of the given node- Overrides:
equalsin classAddressTrie.TrieNode<IPv6Address>
-
-