static class Matches { String[] m; *() {} *(S... *m) {} String get(int i) { return i < m.length ? m[i] : null; } String unq(int i) { return unquote(get(i)); } ifdef Matches_fsi String fsi(int i) { return formatSnippetID(unq(i)); } String fsi() { return fsi(0); } endifdef String tlc(int i) { return unq(i).toLowerCase(); } boolean bool(int i) { return "true".equals(unq(i)); } String rest() { return m[m.length-1]; } // for matchStart int psi(int i) { return Integer.parseInt(unq(i)); } toString { ret "Matches(" + joinWithComma(quoteAll(asList(m))) + ")"; } public int hashCode() { ret _hashCode(toList(m)); } public bool equals(O o) { ret o instanceof Matches && arraysEqual(m, o/Matches.m); } }