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

Method contains

src/main/java/groovy/lang/ObjectRange.java:420–430  ·  view source on GitHub ↗

Iterates over all values and returns true if one value matches. @see #containsWithinBounds(Object)

(Object value)

Source from the content-addressed store, hash-verified

418 * @see #containsWithinBounds(Object)
419 */
420 @Override
421 public boolean contains(Object value) {
422 final Iterator<Comparable> iter = new StepIterator(this, 1);
423 if (value == null) {
424 return false;
425 }
426 while (iter.hasNext()) {
427 if (DefaultTypeTransformation.compareEqual(value, iter.next())) return true;
428 }
429 return false;
430 }
431
432 /**
433 * {@inheritDoc}

Calls 3

hasNextMethod · 0.95
compareEqualMethod · 0.95
nextMethod · 0.95