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

Method findFirst

src/main/java/org/codehaus/groovy/ast/query/AstQuery.java:264–267  ·  view source on GitHub ↗

@return the first match in document order, if any; stops at the first match

()

Source from the content-addressed store, hash-verified

262 * @return the first match in document order, if any; stops at the first match
263 */
264 public Optional<T> findFirst() {
265 List<T> hits = run(true);
266 return hits.isEmpty() ? Optional.empty() : Optional.of(hits.get(0));
267 }
268
269 /**
270 * @return the first match in document order, or {@code null}; stops at the first match

Callers 15

firstMethod · 0.95
variableInputStreamMethod · 0.80
overMethod · 0.80
defaultUnitForMethod · 0.80
findFallbackEntryMethod · 0.80
getCallingClassMethod · 0.80
MixinInMetaClassMethod · 0.80
getPropertyMethod · 0.80

Calls 4

runMethod · 0.95
ofMethod · 0.65
getMethod · 0.65
isEmptyMethod · 0.45

Tested by

no test coverage detected