Package org.dishevelled.bio.range.tree
Class CenteredRangeTree<C extends Comparable>
java.lang.Object
org.dishevelled.bio.range.tree.AbstractRangeTree<C>
org.dishevelled.bio.range.tree.CenteredRangeTree<C>
- Type Parameters:
C- range endpoint type
- All Implemented Interfaces:
RangeTree<C>
Centered range tree.
- Author:
- Michael Heuer
-
Method Summary
Modifier and TypeMethodDescriptionstatic <C extends Comparable>
RangeTree<C>Create and return a new range tree from the specified ranges.Return the ranges in this range tree that intersect the specified query range, if any.intsize()Return the number of ranges in this range tree.Methods inherited from class org.dishevelled.bio.range.tree.AbstractRangeTree
contains, count, count, intersect, intersects, intersects, isEmpty, query
-
Method Details
-
size
public int size()Description copied from interface:RangeTreeReturn the number of ranges in this range tree.- Returns:
- the number of ranges in this range tree
-
intersect
public Iterable<com.google.common.collect.Range<C>> intersect(com.google.common.collect.Range<C> range) Description copied from interface:RangeTreeReturn the ranges in this range tree that intersect the specified query range, if any.- Parameters:
range- range to intersect, must not be null- Returns:
- the ranges in this range tree that intersect the specified query range, if any
-
create
public static <C extends Comparable> RangeTree<C> create(Iterable<com.google.common.collect.Range<C>> ranges) Create and return a new range tree from the specified ranges.- Type Parameters:
C- range endpoint type- Parameters:
ranges- ranges, must not be null- Returns:
- a new range tree from the specified ranges
-