/** Forces computation of the current front, returning the number of indices it contains. * * <p>After a call to this method, * the first elements of {@link #front} contain * the indices of the {@linkplain AbstractCompositeDocumentIterator#documentIterator component document iterators} * that are positioned on the current document. If the front has already been * computed for the current document, this method has no side effects. * * @return the size of the current front (the number of valid entries in {@link #front}). */ protected int computeFront() { if ( frontSize == -1 ) frontSize = queue.front( front ); return frontSize; }
public void intervalTerms( final IntSet terms ) { final int frontSize = positionQueue.front( positionFront ); final int[] positionFront = this.positionFront; for( int i = frontSize; i-- != 0; ) terms.add( indexIterator[ positionFront[ i ] ].termNumber() ); }
public void intervalTerms( final LongSet terms ) { final int frontSize = positionQueue.front( positionFront ); final int[] positionFront = this.positionFront; for( int i = frontSize; i-- != 0; ) terms.add( indexIterator[ positionFront[ i ] ].termNumber() ); }