reformat all code

This commit is contained in:
Leijurv
2023-03-15 13:30:23 -07:00
parent 2af6dec3df
commit 8ee36bcd46
23 changed files with 341 additions and 203 deletions

View File

@@ -8,16 +8,21 @@ package com.github.btrekkie.interval_tree;
* interval. Each node is augmented with the maximum ending value of an interval in the subtree rooted at the node.
*/
public class IntervalTree {
/** The root node of the tree. */
/**
* The root node of the tree.
*/
private IntervalTreeNode root = IntervalTreeNode.LEAF;
/** Adds the specified interval to this. */
/**
* Adds the specified interval to this.
*/
public void addInterval(IntervalTreeInterval interval) {
root = root.insert(new IntervalTreeNode(interval), true, null);
}
/**
* Removes the specified interval from this, if it is present.
*
* @param interval The interval.
* @return Whether the interval was present.
*/