Interface RangeTree<C extends Comparable,V>

Type Parameters:
C - range endpoint type
V - value type
All Known Implementing Classes:
AbstractRangeTree, CenteredRangeTree

public interface RangeTree<C extends Comparable,V>
Range tree composed of entries.
Author:
Michael Heuer
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Entry in a range tree.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    contains(C location)
    Return true if the specified location intersects with any range entries in this range tree.
    int
    count(C location)
    Return the number of range entries in this range tree at the specified location.
    int
    count(com.google.common.collect.Range<C> query)
    Return the number of range entries in this range tree that intersect the specified query range.
    intersect(com.google.common.collect.Range<C> query)
    Return the range entries in this range tree that intersect the specified query range, if any.
    boolean
    intersects(com.google.common.collect.Range<C> query)
    Return true if the specified query range intersects with any range entries in this range tree.
    boolean
    intersects(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.
    boolean
    Return true if the number of range entries in this range tree is zero.
    query(C location)
    Return the range entries in this range tree at the specified location, if any.
    int
    Return the number of range entries in this range tree.
  • Method Details

    • size

      int size()
      Return the number of range entries in this range tree.
      Returns:
      the number of range entries in this range tree
    • isEmpty

      boolean isEmpty()
      Return true if the number of range entries in this range tree is zero.
      Returns:
      true if the number of range entries in this range tree is zero
    • contains

      boolean contains(C location)
      Return true if the specified location intersects with any range entries in this range tree.
      Parameters:
      location - location to intersect
      Returns:
      true if the specified location intersects with any range entries in this range tree
    • count

      int count(C location)
      Return the number of range entries in this range tree at the specified location.
      Parameters:
      location - location
      Returns:
      the number of range entries in this range tree at the specified location
    • query

      Iterable<RangeTree.Entry<C,V>> query(C location)
      Return the range entries in this range tree at the specified location, if any.
      Parameters:
      location - location
      Returns:
      the range entries in this range tree at the specified location, if any
    • count

      int count(com.google.common.collect.Range<C> query)
      Return the number of range entries in this range tree that intersect the specified query range.
      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
    • intersect

      Iterable<RangeTree.Entry<C,V>> intersect(com.google.common.collect.Range<C> query)
      Return the range entries in this range tree that intersect the specified query range, if any.
      Parameters:
      query - range to intersect, must not be null
      Returns:
      the range entries in this range tree that intersect the specified query range, if any
    • intersects

      boolean intersects(com.google.common.collect.Range<C> query)
      Return true if the specified query range intersects with any range entries in this range tree.
      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

      boolean intersects(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.
      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