All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.isi.nlp.collections.OverlappingRangeSet Maven / Gradle / Ivy

The newest version!
package edu.isi.nlp.collections;

import com.google.common.collect.Range;
import java.util.Collection;

/**
 * A container for a set of potentially overlapping {@code Range} which supports various
 * containment queries. All operations support the closedness notion of the inserted {@link Range}s.
 *
 * 

Guava supports collections of disjoint and nested ranges, see {@link * com.google.common.collect.RangeSet} and {@link com.google.common.collect.TreeRangeSet}, however * there is no current implementation for a structured set of {@link Range}s which may overlap. This * class aims to fill that gap. * * @author Jay DeYoung */ public interface OverlappingRangeSet> { /** * Returns a {@link Collection} of ranges containing this item. Multiplicity preservation is * implementation dependent. */ Collection> rangesContaining(T item); /** * Returns a {@link Collection} of ranges containing this query range. Multiplicity preservation * is implementation dependent. */ Collection> rangesContaining(Range queryRange); /** * Returns a {@link Collection} of ranges contained by this query range. Multiplicity preservation * is implementation dependent. */ Collection> rangesContainedBy(Range queryRange); /** * Returns a {@link Collection} of ranges overlapping this query range. Multiplicity preservation * is implementation dependent. */ Collection> rangesOverlapping(Range queryRange); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy