new TermMatch(term, true, term.subSequence(stateForPrefix.index + 1, term.length()))), 0, 1)); new TermMatch(term, true, term.subSequence(stateForPrefix.index + 1, term.length()))); if (isTerm) { final Term term = (Term) element; result.add(new Action( stateForPrefix.value, new TermMatches(new TermMatch(term, true, term.subSequence(stateForPrefix.index + 1, term.length()))), pos, pos + 1));