Additional top-level class in compilation unit: RedBlackTreeModule.
Based on
| Modifier and Type | Class and Description |
|---|---|
| public static enum |
| Modifier and Type | Field and Description |
|---|---|
| public static final long |
| Modifier and Type | Method and Description |
|---|---|
| public RedBlackTree. | |
| public Comparator | Returns: The comparator.Returns the underlying |
| public boolean | Returns: true, if this tree contains the value, false otherwise.A value. value)Checks, if this |
| public default RedBlackTree | Returns: A new RedBlackTree if the value is present, otherwise this.A value value)Deletes a value from this RedBlackTree. |
| public default RedBlackTree | |
| public static <T> RedBlackTree | |
| public RedBlackTree | |
| public Option | Returns: Some value, if this tree contains a value equal to the given value according to the underlying comparator. Otherwise None.A value value)Finds the value stored in this tree, if exists, by applying the underlying comparator to the tree elements and the given element. |
| public default RedBlackTree | Returns: A new tree if this tree does not contain the given value, otherwise the same tree instance.A value. value)Inserts a new value into this tree. |
| public default RedBlackTree | |
| public boolean | Returns: true, if it is empty, false otherwise.Checks if this |
| public default Iterator | iterator()
Implements java. Returns an Iterator that iterates elements in the order induced by the underlying Comparator. |
| public RedBlackTree | |
| public default Option | Returns: Some element, if this is not empty, otherwise NoneReturns the maximum element of this tree according to the underlying comparator. |
| public default Option | Returns: Some element, if this is not empty, otherwise NoneReturns the minimum element of this tree according to the underlying comparator. |
| public static <T> RedBlackTree | |
| public static <T> RedBlackTree | |
| public static <T> RedBlackTree | |
| public RedBlackTree | Returns: The right child.Returns the right child if this is a non-empty node, otherwise throws. |
| public int | Returns: the number of nodes of this tree and 0 if this is the empty treeReturns the size of this tree. |
| public String | |
| public default RedBlackTree | Returns: A new RedBlackTree that contains all distinct elements of this and the giventree.The RedBlackTree to form the union with. tree)Adds all of the elements of the given |
| public T |
| serialVersionUID | back to summary |
|---|---|
| public static final long serialVersionUID | |
| color | back to summary |
|---|---|
| public RedBlackTree. Return the
An empty node is
| |
| comparator | back to summary |
|---|---|
| public Comparator Returns the underlying
| |
| contains | back to summary |
|---|---|
| public boolean contains(T value) Checks, if this
| |
| delete | back to summary |
|---|---|
| public default RedBlackTree Deletes a value from this RedBlackTree.
| |
| difference | back to summary |
|---|---|
| public default RedBlackTree | |
| empty | back to summary |
|---|---|
| public static <T> RedBlackTree | |
| emptyInstance | back to summary |
|---|---|
| public RedBlackTree Returns the empty instance of this RedBlackTree.
| |
| find | back to summary |
|---|---|
| public Option Finds the value stored in this tree, if exists, by applying the underlying comparator to the tree elements and the given element. Especially the value returned may differ from the given value, even if the underlying comparator states that both are equal.
| |
| insert | back to summary |
|---|---|
| public default RedBlackTree Inserts a new value into this tree.
| |
| intersection | back to summary |
|---|---|
| public default RedBlackTree | |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Checks if this
| |
| iterator | back to summary |
|---|---|
| public default Iterator Implements java. Returns an Iterator that iterates elements in the order induced by the underlying Comparator. Internally an in-order traversal of the RedBlackTree is performed. Example:
Iteration order: 1, 2, 3, 4, 5, 6, 7
See also Implement Iterator for BinaryTree I (In-order).
| |
| left | back to summary |
|---|---|
| public RedBlackTree Returns the left child if this is a non-empty node, otherwise throws.
| |
| max | back to summary |
|---|---|
| public default Option Returns the maximum element of this tree according to the underlying comparator.
| |
| min | back to summary |
|---|---|
| public default Option Returns the minimum element of this tree according to the underlying comparator.
| |
| of | back to summary |
|---|---|
| public static <T> RedBlackTree | |
| of | back to summary |
|---|---|
public static <T> RedBlackTree
| |
| ofAll | back to summary |
|---|---|
public static <T> RedBlackTree
| |
| right | back to summary |
|---|---|
| public RedBlackTree Returns the right child if this is a non-empty node, otherwise throws.
| |
| size | back to summary |
|---|---|
| public int size() Returns the size of this tree.
| |
| toString | back to summary |
|---|---|
| public String toString() Returns a Lisp like representation of this tree. | |
| union | back to summary |
|---|---|
| public default RedBlackTree Adds all of the elements of the given
| |
| value | back to summary |
|---|---|
| public T value() Returns the value of the current tree node or throws if this is empty.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final RedBlackTree. | |
| public static final RedBlackTree. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public String | toString()
Overrides java. Returns the name of this enum constant, as contained in the declaration. |
| public static RedBlackTree. | |
| public static RedBlackTree. |
| BLACK | back to summary |
|---|---|
| public static final RedBlackTree. | |
| RED | back to summary |
|---|---|
| public static final RedBlackTree. | |
| Color | back to summary |
|---|---|
| private Color() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum class should override this method when a more "programmer-friendly" string form exists. | |
| valueOf | back to summary |
|---|---|
| public static RedBlackTree. | |
| values | back to summary |
|---|---|
| public static RedBlackTree. | |