agents

## Class AVLIntervalTree.Node

- java.lang.Object
- - agents.AVLIntervalTree.Node

All Implemented Interfaces:
  java.io.Serializable

Enclosing class:
  AVLIntervalTree

    public class AVLIntervalTree.Node
    extends java.lang.Object
    implements java.io.Serializable

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:
  `AVLIntervalTree`, Serialized Form

### Field Summary

Fields
`Range` `element` Element contained in the current node.
`AVLIntervalTree.Node` `left` Left sub-tree.
`double` `max` The maximum value of the subtree.
`AVLIntervalTree.Node` `parent` Parent tree.
`AVLIntervalTree.Node` `right` Right sub-tree.
`agents.AVLIntervalTree.Skew` `skew` Skew factor.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `allComputeMax()` All compute max.
`void` `delete()` Delete the node from the tree.
`Range` `getElement()` Get the contained element.
`double` `getMax()` Gets the max.
`AVLIntervalTree.Node` `getNext()` Get the node containing the next larger or equal element.
`AVLIntervalTree.Node` `getPrevious()` Get the node containing the next smaller or equal element.
`void` `resetMax()` Reset max.
`void` `setMax(double max)` Sets the max.

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

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

### Field Detail

#### element

    public Range element

Element contained in the current node.

#### left

    public AVLIntervalTree.Node left

Left sub-tree.

#### right

    public AVLIntervalTree.Node right

Right sub-tree.

#### parent

    public AVLIntervalTree.Node parent

Parent tree.

#### skew

    public agents.AVLIntervalTree.Skew skew

Skew factor.

#### max

    public double max

The maximum value of the subtree.

### Method Detail

#### resetMax

    public void resetMax()

Reset max.

#### allComputeMax

    public void allComputeMax()

All compute max.

#### getMax

    public double getMax()

Gets the max.

Returns:
  the max

#### setMax

    public void setMax(double max)

Sets the max.

Parameters:
  `max` - the new max

#### getElement

    public Range getElement()

Get the contained element.

Returns:
  element contained in the node

#### getPrevious

    public AVLIntervalTree.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 AVLIntervalTree.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.