@Override
  public int nextStartPosition() throws IOException {
    if (currentStartPosition < minPosition) {
      currentStartPosition = minPosition;
      currentEndPosition = currentStartPosition + 1;
    } else {
      currentStartPosition++;
      currentEndPosition = currentStartPosition + 1;
      if (currentStartPosition > maxPosition) {
        currentStartPosition = NO_MORE_POSITIONS;
        currentEndPosition = NO_MORE_POSITIONS;
      }
    }
    return currentStartPosition;
  }
@ Override public int nextStartPosition ( ) throws IOException { if ( currentStartPosition < minPosition ) { currentStartPosition = minPosition ; currentEndPosition = currentStartPosition + 1 ; } else { currentStartPosition ++ ; currentEndPosition = currentStartPosition + 1 ; if ( currentStartPosition > maxPosition ) { currentStartPosition = NO_MORE_POSITIONS ; currentEndPosition = NO_MORE_POSITIONS ; } } return currentStartPosition ; }
/*
(non-Javadoc)

@see org.apache.lucene.search.spans.Spans#nextStartPosition()