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