Class RangeList<C extends Comparable>

java.lang.Object
org.dishevelled.bio.range.tree.AbstractRangeTree<C>
org.dishevelled.bio.range.tree.RangeList<C>
Type Parameters:
C - range endpoint type
All Implemented Interfaces:
RangeTree<C>

public final class RangeList<C extends Comparable> extends AbstractRangeTree<C>
Range list.
Author:
Michael Heuer
  • Method Details

    • size

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

      public boolean isEmpty()
      Description copied from interface: RangeTree
      Return true if the number of ranges in this range tree is zero.
      Specified by:
      isEmpty in interface RangeTree<C extends Comparable>
      Overrides:
      isEmpty in class AbstractRangeTree<C extends Comparable>
      Returns:
      true if the number of ranges in this range tree is zero
    • intersect

      public Iterable<com.google.common.collect.Range<C>> intersect(com.google.common.collect.Range<C> query)
      Description copied from interface: RangeTree
      Return the ranges in this range tree that intersect the specified query range, if any.
      Parameters:
      query - 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