@Override public boolean nextPosition() throws IOException { // move the included spans to its next position if (!includeSpans.nextPosition()) { // no match for included spans return false; } // try to find a non excluded position return this.toNonExcludedPosition(); }