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

Method range

output/java_guava/1.4.18/Range.java:213–219  ·  view source on GitHub ↗

Returns a range that contains any value from lower to upper, where each endpoint may be either inclusive (closed) or exclusive (open). @throws IllegalArgumentException if lower is greater than upper @since 14.0

(C lower, BoundType lowerType, C upper, BoundType upperType)

Source from the content-addressed store, hash-verified

211
212
213 public static <C extends Comparable<?>> Range<C> range(C lower, BoundType lowerType, C upper, BoundType upperType) {
214 checkNotNull(lowerType);
215 checkNotNull(upperType);
216 Cut<C> lowerBound = (lowerType == BoundType.OPEN) ? Cut.aboveValue(lower) : Cut.belowValue(lower);
217 Cut<C> upperBound = (upperType == BoundType.OPEN) ? Cut.belowValue(upper) : Cut.aboveValue(upper);
218 return create(lowerBound, upperBound);
219 }
220
221 /**
222 * Returns a range that contains all values strictly less than {@code

Callers 5

subMapMethod · 0.95
subMapMethod · 0.95
subMapMethod · 0.95
subSetImplMethod · 0.95
subSetImplMethod · 0.95

Calls 4

aboveValueMethod · 0.95
belowValueMethod · 0.95
createMethod · 0.95
checkNotNullMethod · 0.45

Tested by

no test coverage detected