public final class SuggestWordQueue extends PriorityQueue<SuggestWord>
Modifier and Type | Field | Description |
---|---|---|
static Comparator<SuggestWord> |
DEFAULT_COMPARATOR |
Constructor | 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 | Description |
---|---|---|
protected boolean |
lessThan(SuggestWord wa,
SuggestWord wb) |
Determines the ordering of objects in this priority queue.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add, clear, getHeapArray, getSentinelObject, initialize, insertWithOverflow, pop, size, top, updateTop
public static final Comparator<SuggestWord> DEFAULT_COMPARATOR
public SuggestWordQueue(int size)
DEFAULT_COMPARATOR
size
- The size of the queuepublic SuggestWordQueue(int size, Comparator<SuggestWord> comparator)
size
- The sizecomparator
- The comparator.protected final boolean lessThan(SuggestWord wa, SuggestWord wb)
PriorityQueue
lessThan
in class PriorityQueue<SuggestWord>
true
iff parameter a is less than parameter b.Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.