Finds every range in this object for which {@code range}.{@link Range#encloses(Range)} {@code
queryRange}, without preserving multiplicity.
496150
@Override
  public Collection<Range<T>> rangesContaining(final Range<T> queryRange) {
    final ImmutableSet.Builder<Range<T>> ret = ImmutableSet.builder();
    for (final Range<T> range : ranges) {
      if (range.encloses(queryRange)) {
        ret.add(range);
      }
    }
    return ret.build();
  }
100819
public Pair<Long, Long> getRangeContaining(long seq) {
        Range<Long> range = m_map.rangeContaining(seq);
        if (range != null) {
            return new Pair<Long, Long>(start(range), end(range));
        }
        return null;
    }
1204023
public static <E, D extends Comparable> Range<E, D> newRange(Attribute<?, ?>... fields) {
        return new Range<E, D>(fields);
    }
1351626
public final boolean adjacent(final DateRange range) {
        boolean adjacent = false;
        if (rangeStart.equals(range.getRangeEnd())) {
            adjacent = true;
        } else if (rangeEnd.equals(range.getRangeStart())) {
            adjacent = true;
        }
        return adjacent;
    }
1069394
def check_range_key(query_on, key):
    """"""
    return (
        isinstance(key, BaseCondition) and
        key.operation in ("begins_with", "between", "<", ">", "<=", ">=", "==") and
        key.column is query_on.range_key
    )
520214
public Range getRange() {
    Long rangeMin = getRangeMin();
    Long rangeMax = getRangeMax();
    return rangeMin != null || rangeMax != null ? new Range(rangeMin, rangeMax) : null;
  }
1004593
@Override
  public boolean intersects(IVersionRange yourRange)
  {
    for (IVersionRange range : ranges) {
      if (range.intersects(yourRange)) {
        return true;
      }
    }
    return false;
  }
1041548
private static long start(Range<Long> range) {
        if (range.lowerBoundType() == BoundType.OPEN) {
            return DiscreteDomain.longs().next(range.lowerEndpoint());
        } else {
            return range.lowerEndpoint();
        }
    }
928489
public Query range(String start, String end) {
    return range(wrapKey(start), wrapKey(end));
  }
794832
@VisibleForTesting
  RangeSet<RowKeyWrapper> rowSetToRangeSet(RowSet btRowSet) {
    RangeSet<RowKeyWrapper> rangeSet = TreeRangeSet.create();
    for (RowRange btRowRange : btRowSet.getRowRangesList()) {
      rangeSet.add(rowRangeToRange(btRowRange));
    }
    for (ByteString key : btRowSet.getRowKeysList()) {
      rangeSet.add(Range.singleton(new RowKeyWrapper(key)));
    }
    return rangeSet;
  }
78203
private int[] range(int start, int end) {
        if (rangeList == null) {
            rangeList = new int[] { start, end+1, HIGH };
        } else {
            rangeList[0] = start;
            rangeList[1] = end+1;
        }
        return rangeList;
    }
1349820
private static void checkRange(int fromIndex, int toIndex) {
		if (fromIndex < 0)
			throw new IndexOutOfBoundsException("fromIndex < 0: " + fromIndex);
		if (toIndex < 0)
			throw new IndexOutOfBoundsException("toIndex < 0: " + toIndex);
		if (fromIndex > toIndex)
			throw new IndexOutOfBoundsException("fromIndex: " + fromIndex +
					" > toIndex: " + toIndex);
	}
1370955
def checkQueryRange(self, start, end):
        
        condition = (
            (start < 0 or end > self.getLength()) or
            start > end or start == end)
        if condition:
            raise exceptions.ReferenceRangeErrorException(
                self.getId(), start, end)
1159101
public boolean containsRange(final Range<T> other) {
        if (other == null) {
            return false;
        }

        return (other.lowerEndpoint.isClosed ? contains(other.lowerEndpoint.value) : lowerEndpoint.value.compareTo(other.lowerEndpoint.value) <= 0)
                && (other.upperEndpoint.isClosed ? contains(other.upperEndpoint.value) : upperEndpoint.value.compareTo(other.upperEndpoint.value) >= 0);
    }
18557
@Override
  public boolean intersects(IVersionRange yourRange)
  {
    return range1.intersects(yourRange) && range2.intersects(yourRange);
  }
996141
public static <C extends Comparable> RangeTree<C> create(final Iterable<Range<C>> ranges) {
        return new CenteredRangeTree<C>(ranges);
    }
449399
public void setRange(String range) {
        String single = range.trim();
        int hyphenIndex = range.indexOf('-');

        if (hyphenIndex > 0) {
            this.start = rangeSingle(range.substring(0, hyphenIndex));
            this.end = rangeSingle(range.substring(hyphenIndex + 1));
        } else {
            int number = rangeSingle(range);
            if (number >= 0) { // first n attributes
                this.start = 0;
                this.end = number;
            } else { // last n attributes
                this.start = this.upperLimit + number > 0 ? this.upperLimit + number : 0;
                this.end = this.upperLimit - 1;
            }
        }
    }