| Modifier and Type | Class and Description |
|---|---|
class |
DateInterval
A class representing an interval with Dates as start and end points.
|
class |
DoubleInterval
A class representing an interval with Doubles as start and end points.
|
class |
IntegerInterval
A class representing an interval with Integers as start and end points.
|
| Modifier and Type | Field and Description |
|---|---|
protected NavigableSet<Interval<T>> |
TreeNode.decreasing
A set containing all
Intervals stored in this node, ordered by their
starting points. |
protected NavigableSet<Interval<T>> |
TreeNode.increasing
A set containing all
Intervals stored in this node, ordered by their
end points. |
static Comparator<Interval> |
Interval.sweepLeftToRight
A comparator that can be used as a parameter for sorting functions.
|
static Comparator<Interval> |
Interval.sweepRightToLeft
A comparator that can be used as a parameter for sorting functions.
|
| Modifier and Type | Method and Description |
|---|---|
Interval<T> |
Interval.Builder.build()
Builds the new interval
|
protected abstract Interval<T> |
Interval.create()
Used to create new instances of a specific
Interval subclass. |
protected Interval<Double> |
DoubleInterval.create() |
protected Interval<Date> |
DateInterval.create() |
protected Interval<T> |
Interval.create(T start,
boolean isStartInclusive,
T end,
boolean isEndInclusive)
Creates a new instance of the particular
Interval subclass. |
Interval<T> |
Interval.getIntersection(Interval<T> other)
Returns an interval, representing the intersection of two intervals.
|
| Modifier and Type | Method and Description |
|---|---|
Iterator<Interval<T>> |
IntervalTree.iterator() |
Set<Interval<T>> |
IntervalTree.query(Interval<T> interval)
Searches for and returns all intervals stored in the tree, that intersect a given
query interval.
|
Set<Interval<T>> |
IntervalTree.query(T point)
Searches for and returns all intervals stored in the tree, that contain a given
query point.
|
static <T extends Comparable<? super T>> |
TreeNode.query(TreeNode<T> root,
T point,
Set<Interval<T>> res)
A helper function for the
IntervalTree.query(Comparable) method. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
IntervalTree.add(Interval<T> interval)
Adds an interval to the tree.
|
static <T extends Comparable<? super T>> |
TreeNode.addInterval(IntervalTree<T> tree,
TreeNode<T> root,
Interval<T> interval)
Adds a new interval to the subtree rooted at a
TreeNode. |
protected int |
Interval.compareSpecialization(Interval<T> other)
A method that should be overwritten by subclasses of
Interval, if they have properties
that characterize the objects of the class and are used to identify them. |
boolean |
Interval.contains(Interval<T> another)
Checks if the current interval contains the entirety of another interval.
|
Interval<T> |
Interval.getIntersection(Interval<T> other)
Returns an interval, representing the intersection of two intervals.
|
boolean |
Interval.intersects(Interval<T> query)
Checks if the current interval intersects another interval.
|
boolean |
Interval.isLeftOf(Interval<T> other)
This method checks, if this current interval is entirely to the left of another interval
with no common points.
|
boolean |
Interval.isRightOf(Interval<T> other)
This method checks, if this current interval is entirely to the right of another interval
with no common points.
|
Set<Interval<T>> |
IntervalTree.query(Interval<T> interval)
Searches for and returns all intervals stored in the tree, that intersect a given
query interval.
|
boolean |
IntervalTree.remove(Interval<T> interval)
Removes an interval from the tree, if it was stored in it.
|
static <T extends Comparable<? super T>> |
TreeNode.removeInterval(IntervalTree<T> tree,
TreeNode<T> root,
Interval<T> interval)
A helper function for the
IntervalTree.remove(Interval) method. |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Comparable<? super T>> |
TreeNode.query(TreeNode<T> root,
T point,
Set<Interval<T>> res)
A helper function for the
IntervalTree.query(Comparable) method. |
| Constructor and Description |
|---|
TreeNode(Interval<T> interval)
Instantiates a new node in an
IntervalTree. |
Copyright © 2016. All rights reserved.