MCPcopy Index your code
hub / github.com/apache/groovy / contains

Method contains

src/main/java/groovy/lang/IntRange.java:494–504  ·  view source on GitHub ↗

{@inheritDoc}

(Object value)

Source from the content-addressed store, hash-verified

492 * {@inheritDoc}
493 */
494 @Override
495 public boolean contains(Object value) {
496 if (value instanceof Integer) {
497 return (Integer) value >= getFrom() && (Integer) value <= getTo();
498 }
499 if (value instanceof BigInteger bigint) {
500 return bigint.compareTo(BigInteger.valueOf(getFrom())) >= 0 &&
501 bigint.compareTo(BigInteger.valueOf(getTo())) <= 0;
502 }
503 return false;
504 }
505
506 /**
507 * {@inheritDoc}

Callers 15

containsWithinBoundsMethod · 0.95
possibleMovesMethod · 0.45
doCallMethod · 0.45
testContainsMethod · 0.45
testContainsMethod · 0.45
testContainsMethod · 0.45
testSubListMethod · 0.45
doTestContainsMethod · 0.45
testDepMethod · 0.45

Calls 4

getFromMethod · 0.95
getToMethod · 0.95
compareToMethod · 0.45
valueOfMethod · 0.45

Tested by 15

doCallMethod · 0.36
testContainsMethod · 0.36
testContainsMethod · 0.36
testContainsMethod · 0.36
testSubListMethod · 0.36
doTestContainsMethod · 0.36
testDepMethod · 0.36
testTransitiveDepMethod · 0.36
checkErrorMessageMethod · 0.36