/** * Returns the index of the first character following the text that matched * a given group. * * @param group * the group, ranging from 0 to groupCount() - 1, with 0 * representing the whole pattern. * @return the character index. * @throws IllegalStateException * if no successful match has been made. */ public int end(int group) { ensureMatch(); return matchOffsets[(group * 2) + 1]; }
/** * Returns the index of the first character of the text that matched a given * group. * * @param group * the group, ranging from 0 to groupCount() - 1, with 0 * representing the whole pattern. * @return the character index. * @throws IllegalStateException * if no successful match has been made. */ public int start(int group) throws IllegalStateException { ensureMatch(); return matchOffsets[group * 2]; }
ensureMatch(); int from = matchOffsets[group * 2]; int to = matchOffsets[(group * 2) + 1];
/** * Converts the current match into a separate {@link MatchResult} instance * that is independent from this matcher. The new object is unaffected when * the state of this matcher changes. * * @return the new {@code MatchResult}. * @throws IllegalStateException * if no successful match has been made. */ public MatchResult toMatchResult() { ensureMatch(); return new MatchResultImpl(input, matchOffsets); }
/** * Returns the index of the first character of the text that matched a given * group. * * @param group * the group, ranging from 0 to groupCount() - 1, with 0 * representing the whole pattern. * @return the character index. * @throws IllegalStateException * if no successful match has been made. */ public int start(int group) throws IllegalStateException { ensureMatch(); return matchOffsets[group * 2]; }
/** * Returns the index of the first character following the text that matched * a given group. * * @param group * the group, ranging from 0 to groupCount() - 1, with 0 * representing the whole pattern. * @return the character index. * @throws IllegalStateException * if no successful match has been made. */ public int end(int group) { ensureMatch(); return matchOffsets[(group * 2) + 1]; }
/** * Returns the index of the first character following the text that matched * a given group. * * @param group * the group, ranging from 0 to groupCount() - 1, with 0 * representing the whole pattern. * @return the character index. * @throws IllegalStateException * if no successful match has been made. */ public int end(int group) { ensureMatch(); return matchOffsets[(group * 2) + 1]; }
/** * Returns the index of the first character of the text that matched a given * group. * * @param group * the group, ranging from 0 to groupCount() - 1, with 0 * representing the whole pattern. * @return the character index. * @throws IllegalStateException * if no successful match has been made. */ public int start(int group) throws IllegalStateException { ensureMatch(); return matchOffsets[group * 2]; }
/** * Returns the index of the first character following the text that matched * a given group. * * @param group * the group, ranging from 0 to groupCount() - 1, with 0 * representing the whole pattern. * @return the character index. * @throws IllegalStateException * if no successful match has been made. */ public int end(int group) { ensureMatch(); return matchOffsets[(group * 2) + 1]; }
/** * Returns the index of the first character of the text that matched a given * group. * * @param group * the group, ranging from 0 to groupCount() - 1, with 0 * representing the whole pattern. * @return the character index. * @throws IllegalStateException * if no successful match has been made. */ public int start(int group) throws IllegalStateException { ensureMatch(); return matchOffsets[group * 2]; }
/** * Returns the index of the first character of the text that matched a given * group. * * @param group * the group, ranging from 0 to groupCount() - 1, with 0 * representing the whole pattern. * @return the character index. * @throws IllegalStateException * if no successful match has been made. */ public int start(int group) throws IllegalStateException { ensureMatch(); return matchOffsets[group * 2]; }
/** * Returns the index of the first character following the text that matched * a given group. * * @param group * the group, ranging from 0 to groupCount() - 1, with 0 * representing the whole pattern. * @return the character index. * @throws IllegalStateException * if no successful match has been made. */ public int end(int group) { ensureMatch(); return matchOffsets[(group * 2) + 1]; }
/** * Returns the index of the first character of the text that matched a given * group. * * @param group * the group, ranging from 0 to groupCount() - 1, with 0 * representing the whole pattern. * @return the character index. * @throws IllegalStateException * if no successful match has been made. */ public int start(int group) throws IllegalStateException { ensureMatch(); return matchOffsets[group * 2]; }
/** * Returns the index of the first character following the text that matched * a given group. * * @param group * the group, ranging from 0 to groupCount() - 1, with 0 * representing the whole pattern. * @return the character index. * @throws IllegalStateException * if no successful match has been made. */ public int end(int group) { ensureMatch(); return matchOffsets[(group * 2) + 1]; }
/** * Converts the current match into a separate {@link MatchResult} instance * that is independent from this matcher. The new object is unaffected when * the state of this matcher changes. * * @return the new {@code MatchResult}. * @throws IllegalStateException * if no successful match has been made. */ public MatchResult toMatchResult() { ensureMatch(); return new MatchResultImpl(input, matchOffsets); }
/** * Converts the current match into a separate {@link MatchResult} instance * that is independent from this matcher. The new object is unaffected when * the state of this matcher changes. * * @return the new {@code MatchResult}. * @throws IllegalStateException * if no successful match has been made. */ public MatchResult toMatchResult() { ensureMatch(); return new MatchResultImpl(input, matchOffsets); }
/** * Converts the current match into a separate {@link MatchResult} instance * that is independent from this matcher. The new object is unaffected when * the state of this matcher changes. * * @return the new {@code MatchResult}. * @throws IllegalStateException * if no successful match has been made. */ public MatchResult toMatchResult() { ensureMatch(); return new MatchResultImpl(input, matchOffsets); }
/** * Converts the current match into a separate {@link MatchResult} instance * that is independent from this matcher. The new object is unaffected when * the state of this matcher changes. * * @return the new {@code MatchResult}. * @throws IllegalStateException * if no successful match has been made. */ public MatchResult toMatchResult() { ensureMatch(); return new MatchResultImpl(input, matchOffsets); }
/** * Converts the current match into a separate {@link MatchResult} instance * that is independent from this matcher. The new object is unaffected when * the state of this matcher changes. * * @return the new {@code MatchResult}. * @throws IllegalStateException * if no successful match has been made. */ public MatchResult toMatchResult() { ensureMatch(); return new MatchResultImpl(input, matchOffsets); }
/** * Converts the current match into a separate {@link MatchResult} instance * that is independent from this matcher. The new object is unaffected when * the state of this matcher changes. * * @return the new {@code MatchResult}. * @throws IllegalStateException * if no successful match has been made. */ public MatchResult toMatchResult() { ensureMatch(); return new MatchResultImpl(input, matchOffsets); }