Return the start/lower endpoints in the specified ranges.

@param ranges ranges, must not be null, must not contain any null ranges, and all ranges must be [closed, open)
@return the start/lower endpoints in the specified ranges
327926
public static List<Long> starts(final Iterable<Range<Long>> ranges) {
        List<Long> starts = new ArrayList<Long>();
        for (Range<Long> range : ranges) {
            checkClosedOpen(range);
            starts.add(range.lowerEndpoint());
        }
        return starts;
    }
871632
@Override
    public List<Class<? extends AbstractResource>> getEndpoints() {
        List<Class<? extends AbstractResource>> result = new LinkedList<>();

        result.add(AuditResources.class);
        result.add(AuthResources.class);
        result.add(AuthResourcesV2.class);
        result.add(AlertResources.class);
        result.add(AnnotationResources.class);
        result.add(CollectionResources.class);
        result.add(DashboardResources.class);
        result.add(HistoryResources.class);
        result.add(ManagementResources.class);
        result.add(MetricResources.class);
        result.add(NamespaceResources.class);
        result.add(UserResources.class);
        result.add(DiscoveryResources.class);
        return result;
    }
106934
public Iterator<RangeTombstone> rangeIterator()
    {
        return ranges == null ? Iterators.<RangeTombstone>emptyIterator() : ranges.iterator();
    }
800530
public java.util.List<Endpoint> getEndpoints() {
        if (endpoints == null) {
            endpoints = new com.amazonaws.internal.SdkInternalList<Endpoint>();
        }
        return endpoints;
    }
1261886
public long addRange(long start, long end) {
        Range<Long> newRange = range(start, end);
        long nonOverlapSize = end - start + 1;
        if (m_map.intersects(newRange)) {
             for (Range<Long> next : m_map.asRanges()) {
                 if (next.isConnected(newRange)) {
                     Range<Long> intersection = next.intersection(newRange);
                     nonOverlapSize -= end(intersection) - start(intersection) + 1;
                 }
             }
        }
        m_map.add(newRange);
        return nonOverlapSize;
    }
490882
public static List<Range> union(List<Range> ranges){
        ranges = new ArrayList<Range>(ranges);
        Collections.sort(ranges, new Comparator<Range>(){
            @Override
            public int compare(Range r1, Range r2){
                return r1.min-r2.min;
            }
        });
        List<Range> union = new ArrayList<Range>();
        for(Range r: ranges){
            if(union.isEmpty())
                union.add(r);
            else
                CollectionUtil.addAll(union, union.remove(union.size() - 1).union(r));
        }
        return union;
    }
438477
public static CharRanges withRanges(int... ranges) {
    if ((ranges.length & 1) != 0) { throw new IllegalArgumentException(); }
    for (int i = 1; i < ranges.length; ++i) {
      if (ranges[i] <= ranges[i - 1]) {
        throw new IllegalArgumentException(ranges[i] + " > " + ranges[i - 1]);
      }
    }
    return new CharRanges(ranges);
  }
734405
public IVersionRange getRange(Collection<String> versions) throws InvalidRangeException {
    if (versions == null) {
      return null;
    }
    return getRange(versions.toArray(new String[versions.size()]));
  }
649519
public INDArray getRange() {
        if (range == null) {
            try (MemoryWorkspace ws = Nd4j.getMemoryManager().scopeOutOfWorkspaces()) {
                range = upper.sub(lower);
            }
        }
        return range;
    }
748363
public static RubyRange<LocalDateTime> range(LocalDateTime start,
      LocalDateTime end) {
    return new RubyRange<>(LocalDateTimeSuccessor.getInstance(), start, end,
        Interval.CLOSED);
  }
493928
protected void addRange(int start, int end) {
		this.icaseCache = null;
		// System.err.println("Token#addRange(): "+start+" "+end);
		int r1, r2;
		if (start <= end) {
			r1 = start;
			r2 = end;
		} else {
			r1 = end;
			r2 = start;
		}

		int pos = 0;
		if (this.ranges == null) {
			this.ranges = new int[2];
			this.ranges[0] = r1;
			this.ranges[1] = r2;
			this.setSorted(true);
		} else {
			pos = this.ranges.length;
			if (this.ranges[pos - 1] + 1 == r1) {
				this.ranges[pos - 1] = r2;
				return;
			}
			int[] temp = new int[pos + 2];
			System.arraycopy(this.ranges, 0, temp, 0, pos);
			this.ranges = temp;
			if (this.ranges[pos - 1] >= r1)
				this.setSorted(false);
			this.ranges[pos++] = r1;
			this.ranges[pos] = r2;
			if (!this.sorted)
				this.sortRanges();
		}
	}
1360260
public static KeyRange openClosed(Key start, Key end) {
    return new KeyRange(checkNotNull(start), Endpoint.OPEN, checkNotNull(end), Endpoint.CLOSED);
  }
595506
public static <T extends Comparable<T>> RangeSet<T> intersectRangeSets(final Iterable<RangeSet<T>> rangeSets)
  {
    RangeSet<T> rangeSet = null;
    for (final RangeSet<T> set : rangeSets) {
      if (rangeSet == null) {
        rangeSet = TreeRangeSet.create();
        rangeSet.addAll(set);
      } else {
        rangeSet.removeAll(set.complement());
      }
    }
    return rangeSet;
  }
521562
public static RubyRange<Long> range(long start, long end) {
    return new RubyRange<>(LongSuccessor.getInstance(), start, end,
        Interval.CLOSED);
  }
1341339
@SuppressWarnings("unchecked")
	@Override
	public List<T> getAllEndpoints() {
		ArrayList<T> list = new ArrayList<>(endpoints.length);
		for (int i = 0; i < endpoints.length; i++) {
			list.add((T) endpoints[i]);
		}
		return list;
	}
658379
public static Protos.Value.Range range(long begin, long end) {
		return Protos.Value.Range.newBuilder().setBegin(begin).setEnd(end).build();
	}
849299
public final boolean intersects(final DateRange range) {
        boolean intersects = false;
        // Test for our start date in period
        // (Exclude if it is the end date of test range)
        if (range.includes(rangeStart) && !range.getRangeEnd().equals(rangeStart)) {
            intersects = true;
        }
        // Test for test range's start date in our range
        // (Exclude if it is the end date of our range)
        else if (includes(range.getRangeStart())
                && !rangeEnd.equals(range.getRangeStart())) {
            intersects = true;
        }
        return intersects;
    }