Module inet.ipaddr

Class AddedTree.AddedTreeNode<E extends Address>

  • Enclosing class:
    AddedTree<E extends Address>

    public static class AddedTree.AddedTreeNode<E extends Address>
    extends java.lang.Object
    AddedTreeNode represents a node in an AddedTree.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      E getKey()
      getKey returns the key of this node, which is the same as the key of the corresponding node in the originating trie.
      AddedTree.AddedTreeNode<E>[] getSubNodes()  
      boolean isAdded()
      Returns whether the node was an added node in the original trie.
      java.lang.String toString()
      Returns a visual representation of this node including the key.
      java.lang.String toTreeString()
      toTreeString returns a visual representation of the sub-tree originating from this node, with one node per line.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getKey

        public E getKey()
        getKey returns the key of this node, which is the same as the key of the corresponding node in the originating trie.
        Returns:
      • isAdded

        public boolean isAdded()
        Returns whether the node was an added node in the original trie. This returns true for all nodes except possibly the root, since only added nodes are added to this tree, apart from the root.
      • toString

        public java.lang.String toString()
        Returns a visual representation of this node including the key. If this is the root, it will have an open circle if the root is not an added node. Otherwise, the node will have a closed circle.
        Overrides:
        toString in class java.lang.Object
      • toTreeString

        public java.lang.String toTreeString()
        toTreeString returns a visual representation of the sub-tree originating from this node, with one node per line.
        Returns: