Interface RangeTree<C extends Comparable,V>
- Type Parameters:
C- range endpoint typeV- value type
- All Known Implementing Classes:
AbstractRangeTree,CenteredRangeTree
public interface RangeTree<C extends Comparable,V>
Range tree composed of entries.
- Author:
- Michael Heuer
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceRangeTree.Entry<C extends Comparable,V> Entry in a range tree. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn true if the specified location intersects with any range entries in this range tree.intReturn the number of range entries in this range tree at the specified location.intReturn the number of range entries in this range tree that intersect the specified query range.Return the range entries in this range tree that intersect the specified query range, if any.booleanintersects(com.google.common.collect.Range<C> query) Return true if the specified query range intersects with any range entries in this range tree.booleanintersects(Iterable<com.google.common.collect.Range<C>> query) Return true if any range in the specified query list of ranges intersects with any range entries in this range tree.booleanisEmpty()Return true if the number of range entries in this range tree is zero.Return the range entries in this range tree at the specified location, if any.intsize()Return the number of range entries in this range tree.
-
Method Details
-
size
int size()Return the number of range entries in this range tree.- Returns:
- the number of range entries in this range tree
-
isEmpty
boolean isEmpty()Return true if the number of range entries in this range tree is zero.- Returns:
- true if the number of range entries in this range tree is zero
-
contains
Return true if the specified location intersects with any range entries in this range tree.- Parameters:
location- location to intersect- Returns:
- true if the specified location intersects with any range entries in this range tree
-
count
Return the number of range entries in this range tree at the specified location.- Parameters:
location- location- Returns:
- the number of range entries in this range tree at the specified location
-
query
Return the range entries in this range tree at the specified location, if any.- Parameters:
location- location- Returns:
- the range entries in this range tree at the specified location, if any
-
count
Return the number of range entries in this range tree that intersect the specified query range.- Parameters:
query- range to intersect, must not be null- Returns:
- the number of range entries in this range tree that intersect the specified query range
-
intersect
Return the range entries in this range tree that intersect the specified query range, if any.- Parameters:
query- range to intersect, must not be null- Returns:
- the range entries in this range tree that intersect the specified query range, if any
-
intersects
Return true if the specified query range intersects with any range entries in this range tree.- Parameters:
query- range to intersect, must not be null- Returns:
- true if the specified query range intersects with any range entries in this range tree
-
intersects
Return true if any range in the specified query list of ranges intersects with any range entries in this range tree.- Parameters:
query- list of ranges to intersect, must not be null- Returns:
- true if any range in the specified query list of ranges intersects with any range entries in this range tree
-