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 type
V - value type
All Implemented Interfaces:
RangeTree<C,V>

public final class CenteredRangeTree<C extends Comparable,V> extends AbstractRangeTree<C,V>
Centered range tree.
Author:
Michael Heuer
  • Method Details

    • size

      public int size()
      Description copied from interface: RangeTree
      Return the number of range entries in this range tree.
      Returns:
      the number of range entries in this range tree
    • intersect

      public Iterable<RangeTree.Entry<C,V>> intersect(com.google.common.collect.Range<C> range)
      Description copied from interface: RangeTree
      Return 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 type
      V - 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 type
      V - value type
      Parameters:
      ranges - ranges, must not be null and must be equal in size to values
      values - values, must not be null and must be equal in size to ranges
      Returns:
      a new range tree from the specified ranges and values