Lines Matching refs:ranges
35 * @throws java.lang.IllegalArgumentException if ranges are not distinct
37 public static <T extends Comparable<? super T>> void sortDistinctRanges(Range<T>[] ranges) {
38 Arrays.sort(ranges, new Comparator<Range<T>>() {
47 "sample rate ranges must be distinct (" + lhs + " and " + rhs + ")");
53 * Returns the intersection of two sets of non-intersecting ranges
54 * @param one a sorted set of non-intersecting ranges in ascending order
55 * @param another another sorted set of non-intersecting ranges in ascending order
83 * Returns the index of the range that contains a value in a sorted array of distinct ranges.
84 * @param ranges a sorted array of non-intersecting ranges in ascending order
86 * @return if the value is in one of the ranges, it returns the index of that range. Otherwise,
91 int binarySearchDistinctRanges(Range<T>[] ranges, T value) {
92 return Arrays.binarySearch(ranges, Range.create(value, value),