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

Method toArray

java/com/google/re2j/CharClass.java:54–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52 // operations may mutate this array, so typically this is the last operation
53 // performed on a given CharClass instance.
54 int[] toArray() {
55 if (this.len == r.length) {
56 return r;
57 } else {
58 int[] r2 = new int[len];
59 System.arraycopy(r, 0, r2, 0, len);
60 return r2;
61 }
62 }
63
64 // cleanClass() sorts the ranges (pairs of elements) of this CharClass,
65 // merges them, and eliminates duplicates.

Callers 11

parseInternalMethod · 0.95
parseClassMethod · 0.95
assertClassMethod · 0.80
appendGroupMethod · 0.80
simplifyMethod · 0.80
popToPseudoMethod · 0.80
cleanAltMethod · 0.80
mergeCharClassMethod · 0.80
parseUnicodeClassMethod · 0.80
splitMethod · 0.80

Calls

no outgoing calls

Tested by 2

assertClassMethod · 0.64