public final class SuggestWordQueue extends PriorityQueue<SuggestWord>
| Modifier and Type | Field and Description |
|---|---|
static Comparator<SuggestWord> |
DEFAULT_COMPARATOR
Default comparator: score then frequency.
|
| Constructor and Description |
|---|
SuggestWordQueue(int size)
Use the
DEFAULT_COMPARATOR |
SuggestWordQueue(int size,
Comparator<SuggestWord> comparator)
Specify the size of the queue and the comparator to use for sorting.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
lessThan(SuggestWord wa,
SuggestWord wb) |
add, clear, getHeapArray, insertWithOverflow, iterator, pop, remove, size, top, updateTop, updateTopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic static final Comparator<SuggestWord> DEFAULT_COMPARATOR
SuggestWordScoreComparatorpublic SuggestWordQueue(int size)
DEFAULT_COMPARATORsize - The size of the queuepublic SuggestWordQueue(int size,
Comparator<SuggestWord> comparator)
size - The sizecomparator - The comparator.protected final boolean lessThan(SuggestWord wa, SuggestWord wb)
lessThan in class PriorityQueue<SuggestWord>Copyright © 2000-2024 Apache Software Foundation. All Rights Reserved.