## org.apache.lucene.search.suggest
Class BufferingTermFreqIteratorWrapper

    java.lang.Object
      org.apache.lucene.search.suggest.BufferingTermFreqIteratorWrapper

All Implemented Interfaces:
  TermFreqIterator, BytesRefIterator

Direct Known Subclasses:
  UnsortedTermFreqIteratorWrapper

    public class BufferingTermFreqIteratorWrapper

extends Object
implements TermFreqIterator

This wrapper buffers incoming elements.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary

Nested classes/interfaces inherited from interface org.apache.lucene.search.spell.TermFreqIterator
`TermFreqIterator.TermFreqIteratorWrapper`

Field Summary
`protected int` `curPos` current buffer position
`protected BytesRefArray` `entries` buffered term entries
`protected long[]` `freqs` buffered weights, parallel with `entries`

Fields inherited from interface org.apache.lucene.util.BytesRefIterator
`EMPTY`

Constructor Summary
`BufferingTermFreqIteratorWrapper(TermFreqIterator source)` Creates a new iterator, buffering entries from the specified iterator

Method Summary
`Comparator<BytesRef>` `getComparator()`
`BytesRef` `next()`
`long` `weight()` A term's weight, higher numbers mean better suggestions.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### entries

    protected BytesRefArray entries

  buffered term entries

### curPos

    protected int curPos

  current buffer position

### freqs

    protected long[] freqs

  buffered weights, parallel with `entries`

Constructor Detail

### BufferingTermFreqIteratorWrapper

    public BufferingTermFreqIteratorWrapper(TermFreqIterator source)
                                     throws IOException

  Creates a new iterator, buffering entries from the specified iterator

  Throws:
    `IOException`

Method Detail

### weight

    public long weight()

  Description copied from interface: `TermFreqIterator`
  A term's weight, higher numbers mean better suggestions.

  Specified by:
    `weight` in interface `TermFreqIterator`

### next

    public BytesRef next()
                  throws IOException

  Specified by:
    `next` in interface `BytesRefIterator`
  Throws:
    `IOException`

### getComparator

    public Comparator<BytesRef> getComparator()

  Specified by:
    `getComparator` in interface `BytesRefIterator`

Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.