MCPcopy Create free account
hub / github.com/antlr/codebuff / withUpperBoundType

Method withUpperBoundType

output/java_guava/1.4.18/Cut.java:328–339  ·  view source on GitHub ↗
(BoundType boundType, DiscreteDomain<C> domain)

Source from the content-addressed store, hash-verified

326 }
327
328 @Override
329 Cut<C> withUpperBoundType(BoundType boundType, DiscreteDomain<C> domain) {
330 switch (boundType) {
331 case CLOSED:
332 @Nullable C previous = domain.previous(endpoint);
333return (previous == null) ? Cut.<C>aboveAll() : new AboveValue<C>(previous);
334 case OPEN:
335 return this;
336 default:
337 throw new AssertionError();
338 }
339 }
340
341 @Override
342 void describeAsLowerBound(StringBuilder sb) {

Callers

nothing calls this directly

Calls 2

aboveAllMethod · 0.95
previousMethod · 0.45

Tested by

no test coverage detected