org.apache.lucene.search.spell

## Class SuggestWordScoreComparator

- java.lang.Object
- - org.apache.lucene.search.spell.SuggestWordScoreComparator

- All Implemented Interfaces:
    Comparator<SuggestWord>

      public class SuggestWordScoreComparator
      extends Object
      implements Comparator<SuggestWord>

  Score first, then frequency

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SuggestWordScoreComparator()` Creates a new comparator that will compare by `SuggestWord.score`, then by `SuggestWord.freq`, then by `SuggestWord.string`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(SuggestWord first, SuggestWord second)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.util.Comparator

      `comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

- - ### Constructor Detail

    - #### SuggestWordScoreComparator

          public SuggestWordScoreComparator()

      Creates a new comparator that will compare by `SuggestWord.score`, then by `SuggestWord.freq`, then by `SuggestWord.string`.

  - ### Method Detail

    - #### compare

          public int compare(SuggestWord first,
                             SuggestWord second)

      Specified by:
        `compare` in interface `Comparator<SuggestWord>`

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