@Override protected C computeNext(C previous) { return equalsOrThrow(previous, last) ? null : domain.next(previous); } };
@Override C leastValueAbove(DiscreteDomain<C> domain) { return domain.next(endpoint); }
@Override protected C computeNext(C previous) { return equalsOrThrow(previous, last) ? null : domain.next(previous); } };
@Override C leastValueAbove(DiscreteDomain<C> domain) { return domain.next(endpoint); }
@Override protected C computeNext(C previous) { return equalsOrThrow(previous, last) ? null : domain.next(previous); } };
@Override C leastValueAbove(DiscreteDomain<C> domain) { return domain.next(endpoint); }
/** * Returns, conceptually, "origin + distance", or equivalently, the result of calling {@link * #next} on {@code origin} {@code distance} times. */ C offset(C origin, long distance) { checkNonnegative(distance, "distance"); for (long i = 0; i < distance; i++) { origin = next(origin); } return origin; }
/** * Returns, conceptually, "origin + distance", or equivalently, the result of calling {@link * #next} on {@code origin} {@code distance} times. */ C offset(C origin, long distance) { checkNonnegative(distance, "distance"); for (long i = 0; i < distance; i++) { origin = next(origin); } return origin; }
/** * Returns, conceptually, "origin + distance", or equivalently, the result of calling {@link * #next} on {@code origin} {@code distance} times. */ C offset(C origin, long distance) { checkNonnegative(distance, "distance"); for (long i = 0; i < distance; i++) { origin = next(origin); } return origin; }
@Override Cut<C> withUpperBoundType(BoundType boundType, DiscreteDomain<C> domain) { switch (boundType) { case OPEN: @Nullable C next = domain.next(endpoint); return (next == null) ? Cut.<C>aboveAll() : belowValue(next); case CLOSED: return this; default: throw new AssertionError(); } }
@Override Cut<C> withLowerBoundType(BoundType boundType, DiscreteDomain<C> domain) { switch (boundType) { case OPEN: return this; case CLOSED: @Nullable C next = domain.next(endpoint); return (next == null) ? Cut.<C>belowAll() : belowValue(next); default: throw new AssertionError(); } }
@Override public Integer next(Integer value) { return integers().next(value); }
@Override public Integer next(Integer value) { return integers().next(value); }
@Override Cut<C> withLowerBoundType(BoundType boundType, DiscreteDomain<C> domain) { switch (boundType) { case OPEN: return this; case CLOSED: @NullableDecl C next = domain.next(endpoint); return (next == null) ? Cut.<C>belowAll() : belowValue(next); default: throw new AssertionError(); } }
@Override Cut<C> withUpperBoundType(BoundType boundType, DiscreteDomain<C> domain) { switch (boundType) { case OPEN: @NullableDecl C next = domain.next(endpoint); return (next == null) ? Cut.<C>aboveAll() : belowValue(next); case CLOSED: return this; default: throw new AssertionError(); } }
@Override Cut<C> withLowerBoundType(BoundType boundType, DiscreteDomain<C> domain) { switch (boundType) { case OPEN: return this; case CLOSED: @NullableDecl C next = domain.next(endpoint); return (next == null) ? Cut.<C>belowAll() : belowValue(next); default: throw new AssertionError(); } }
@Override Cut<C> withUpperBoundType(BoundType boundType, DiscreteDomain<C> domain) { switch (boundType) { case OPEN: @NullableDecl C next = domain.next(endpoint); return (next == null) ? Cut.<C>aboveAll() : belowValue(next); case CLOSED: return this; default: throw new AssertionError(); } }
@Override protected C computeNext(C previous) { return equalsOrThrow(previous, last) ? null : domain.next(previous); } };
@Override Cut<C> withUpperBoundType(BoundType boundType, DiscreteDomain<C> domain) { switch (boundType) { case OPEN: @Nullable C next = domain.next(endpoint); return (next == null) ? Cut.<C>aboveAll() : belowValue(next); case CLOSED: return this; default: throw new AssertionError(); } } @Override void describeAsLowerBound(StringBuilder sb) {
@Override Cut<C> withUpperBoundType(BoundType boundType, DiscreteDomain<C> domain) { switch (boundType) { case OPEN: @Nullable C next = domain.next(endpoint); return (next == null) ? Cut.<C>aboveAll() : belowValue(next); case CLOSED: return this; default: throw new AssertionError(); } } @Override void describeAsLowerBound(StringBuilder sb) {