org.apache.lucene.search.spell

## Class TermFreqIterator.TermFreqIteratorWrapper

- java.lang.Object
- - org.apache.lucene.search.spell.TermFreqIterator.TermFreqIteratorWrapper

- All Implemented Interfaces:
    TermFreqIterator, BytesRefIterator
  Enclosing interface:
    TermFreqIterator

      public static class TermFreqIterator.TermFreqIteratorWrapper
      extends Object
      implements TermFreqIterator

  Wraps a BytesRefIterator as a TermFreqIterator, with all weights set to `1`

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.lucene.search.spell.TermFreqIterator

      `TermFreqIterator.TermFreqIteratorWrapper`

  - ### Field Summary

    - ### Fields inherited from interface org.apache.lucene.util.BytesRefIterator

      `EMPTY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TermFreqIterator.TermFreqIteratorWrapper(BytesRefIterator wrapped)` Creates a new wrapper, wrapping the specified iterator and specifying a weight value of `1` for all terms.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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`

- - ### Constructor Detail

    - #### TermFreqIterator.TermFreqIteratorWrapper

          public TermFreqIterator.TermFreqIteratorWrapper(BytesRefIterator wrapped)

      Creates a new wrapper, wrapping the specified iterator and specifying a weight value of `1` for all terms.

  - ### 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.