| Modifier and Type | Field and Description |
|---|---|
| private RBColor | |
| private Object | |
| private RBNode | |
| private RBNode | |
| private RBNode |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public RBColor | |
| public Object | |
| public RBNode | |
| public RBNode | |
| public RBNode | |
| public void | |
| public void | |
| public void | |
| public void | |
| public boolean |
| color | back to summary |
|---|---|
| private RBColor color | |
| data | back to summary |
|---|---|
| private Object data | |
| left | back to summary |
|---|---|
| private RBNode left | |
| parent | back to summary |
|---|---|
| private RBNode parent | |
| right | back to summary |
|---|---|
| private RBNode right | |
| RBNode | back to summary |
|---|---|
| public RBNode(Object data) Newly-created nodes are colored red | |
| copyFrom | back to summary |
|---|---|
| public void copyFrom(RBNode arg) Must copy all user-defined fields from the given node. For example, the base implementation copies the "data" field. However, it does not (and must not) copy the link fields (parent, left child, right child). It also does not need to copy any computed information for the node, as the node will be updated when necessary. Subclasses must be careful to call the superclass implementation. | |
| getColor | back to summary |
|---|---|
| public RBColor getColor() | |
| getData | back to summary |
|---|---|
| public Object getData() | |
| getLeft | back to summary |
|---|---|
| public RBNode getLeft() Access to left child | |
| getParent | back to summary |
|---|---|
| public RBNode getParent() | |
| getRight | back to summary |
|---|---|
| public RBNode getRight() Access to right child | |
| setColor | back to summary |
|---|---|
| public void setColor(RBColor color) | |
| setLeft | back to summary |
|---|---|
| public void setLeft(RBNode left) | |
| setParent | back to summary |
|---|---|
| public void setParent(RBNode parent) | |
| setRight | back to summary |
|---|---|
| public void setRight(RBNode right) | |
| update | back to summary |
|---|---|
| public boolean update() This is called by the base RBTree's insertion and deletion methods when necessary. Subclasses can use this to update any computed information based on the information in their left or right children. For multi-node updates it is guaranteed that this method will be called in the correct order. This should return true if an update actually occurred, false if not. | |