Class IntervalTree.Node<V extends Interval>
java.lang.Object
net.buildtheearth.terraminusminus.util.interval.IntervalTree.Node<V>
- All Implemented Interfaces:
Interval
- Enclosing class:
IntervalTree<V extends Interval>
A node in the segment tree (either a leaf or internal node).
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected booleancanSplit()protected intchildIndex(Interval interval) protected voidcleanup()protected IntervalTree.Node<V> createChild(int childIndex) booleanprotected voidprotected voidforEachIntersecting(double point, Consumer<V> callback) inthashCode()protected voiddoublemax()doublemin()protected voidsplit()toString()
-
Field Details
-
children
-
values
-
size
protected int size -
min
protected final double min -
max
protected final double max
-
-
Constructor Details
-
Node
public Node(double min, double max)
-
-
Method Details
-
insert
-
split
protected void split() -
forEachIntersecting
-
forEach
-
canSplit
protected boolean canSplit()- Returns:
- whether or not this node's contents are allowed to be split into children when it overflows
-
childIndex
-
cleanup
protected void cleanup() -
createChild
-
min
public double min() -
max
public double max() -
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-