Class AbstractRangeTree<C extends Comparable,V>
java.lang.Object
org.dishevelled.bio.range.entrytree.AbstractRangeTree<C,V>
- Type Parameters:
C- range endpoint typeV- value type
- All Implemented Interfaces:
RangeTree<C,V>
- Direct Known Subclasses:
CenteredRangeTree
public abstract class AbstractRangeTree<C extends Comparable,V>
extends Object
implements RangeTree<C,V>
Abstract implementation of range tree. Most methods will need
to be overridden to improve performance.
- Author:
- Michael Heuer
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.dishevelled.bio.range.entrytree.RangeTree
RangeTree.Entry<C extends Comparable,V> -
Constructor Summary
Constructors -
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.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.
-
Constructor Details
-
AbstractRangeTree
public AbstractRangeTree()
-
-
Method Details
-
isEmpty
public boolean isEmpty()Description copied from interface:RangeTreeReturn true if the number of range entries in this range tree is zero.- Specified by:
isEmptyin interfaceRangeTree<C extends Comparable,V> - Returns:
- true if the number of range entries in this range tree is zero
-
contains
Description copied from interface:RangeTreeReturn true if the specified location intersects with any range entries in this range tree.- Specified by:
containsin interfaceRangeTree<C extends Comparable,V> - Parameters:
location- location to intersect- Returns:
- true if the specified location intersects with any range entries in this range tree
-
count
Description copied from interface:RangeTreeReturn the number of range entries in this range tree at the specified location.- Specified by:
countin interfaceRangeTree<C extends Comparable,V> - Parameters:
location- location- Returns:
- the number of range entries in this range tree at the specified location
-
query
Description copied from interface:RangeTreeReturn the range entries in this range tree at the specified location, if any.- Specified by:
queryin interfaceRangeTree<C extends Comparable,V> - Parameters:
location- location- Returns:
- the range entries in this range tree at the specified location, if any
-
count
Description copied from interface:RangeTreeReturn the number of range entries in this range tree that intersect the specified query range.- Specified by:
countin interfaceRangeTree<C extends Comparable,V> - 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
-
intersects
Description copied from interface:RangeTreeReturn true if the specified query range intersects with any range entries in this range tree.- Specified by:
intersectsin interfaceRangeTree<C extends Comparable,V> - 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
Description copied from interface:RangeTreeReturn true if any range in the specified query list of ranges intersects with any range entries in this range tree.- Specified by:
intersectsin interfaceRangeTree<C extends Comparable,V> - 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
-