org.apache.commons.math3.geometry.partitioning.utilities

## Class AVLTree.Node

- java.lang.Object
- - org.apache.commons.math3.geometry.partitioning.utilities.AVLTree.Node

- Enclosing class:
    AVLTree<T extends Comparable<T>>

      public class AVLTree.Node
      extends Object

  This class implements AVL trees nodes.

  AVL tree nodes implement all the logical structure of the tree. Nodes are created by the `AVLTree` class.

  The nodes are not independant from each other but must obey specific balancing constraints and the tree structure is rearranged as elements are inserted or deleted from the tree. The creation, modification and tree-related navigation methods have therefore restricted access. Only the order-related navigation, reading and delete methods are public.

  See Also:
    `AVLTree`

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `delete()` Delete the node from the tree.
    `T` | `getElement()` Get the contained element.
    `AVLTree.Node` | `getNext()` Get the node containing the next larger or equal element.
    `AVLTree.Node` | `getPrevious()` Get the node containing the next smaller or equal element.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getElement

          public T getElement()

      Get the contained element.
      Returns:
        element contained in the node

    - #### getPrevious

          public AVLTree.Node getPrevious()

      Get the node containing the next smaller or equal element.
      Returns:
        node containing the next smaller or equal element or null if there is no smaller or equal element in the tree
      See Also:
        `getNext()`

    - #### getNext

          public AVLTree.Node getNext()

      Get the node containing the next larger or equal element.
      Returns:
        node containing the next larger or equal element (in which case the node is guaranteed not to be empty) or null if there is no larger or equal element in the tree
      See Also:
        `getPrevious()`

    - #### delete

          public void delete()

      Delete the node from the tree.

Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.