MCPcopy Create free account
hub / github.com/google/re2j / maxCap

Method maxCap

java/com/google/re2j/Regexp.java:272–286  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

270
271 // maxCap() walks the regexp to find the maximum capture index.
272 int maxCap() {
273 int m = 0;
274 if (op == Op.CAPTURE) {
275 m = cap;
276 }
277 if (subs != null) {
278 for (Regexp sub : subs) {
279 int n = sub.maxCap();
280 if (m < n) {
281 m = n;
282 }
283 }
284 }
285 return m;
286 }
287
288 @Override
289 public int hashCode() {

Callers 1

compileImplMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected