code: public static <C extends Comparable<?>> Range<C> upTo(C endpoint, BoundType boundType) {
      switch (boundType) {
        case OPEN:
          return lessThan(endpoint);
        case CLOSED:
          return atMost(endpoint);
        default:
          throw new AssertionError();
      }
    }
docs: Returns a range with no lower bound up to the given endpoint, which may be either inclusive
  (closed) or exclusive (open).
  
  @since 14.0