code: public static List<Long> ends(final Iterable<Range<Long>> ranges) {
          List<Long> ends = new ArrayList<Long>();
          for (Range<Long> range : ranges) {
              checkClosedOpen(range);
              ends.add(range.upperEndpoint());
          }
          return ends;
      }
docs: Return the end/upper 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 end/upper endpoints in the specified ranges