SuggestWordFrequencyComparator (Lucene 10.5.1 suggest API)
Description: declaration: package: org.apache.lucene.search.spell, class: SuggestWordFrequencyComparator

Package org.apache.lucene.search.spell

# Class SuggestWordFrequencyComparator

java.lang.Object
org.apache.lucene.search.spell.SuggestWordFrequencyComparator

All Implemented Interfaces:
  `Comparator<SuggestWord>`

public class SuggestWordFrequencyComparator extends Object implements Comparator<SuggestWord>
Frequency first, then score.

- ## Constructor Summary

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

- ## Method Summary

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

  `equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

- ## Constructor Details

  - ### SuggestWordFrequencyComparator

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

- ## Method Details

  - ### compare

    public int compare(SuggestWord first, SuggestWord second)
    Specified by:
      `compare` in interface `Comparator<SuggestWord>`