public final class CompletionProposalComparator extends Object implements Comparator<ICompletionProposal>
Note: this comparator imposes orderings that are inconsistent with equals.
Constructor and Description |
---|
CompletionProposalComparator()
Creates a comparator that sorts by relevance.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(ICompletionProposal p1,
ICompletionProposal p2) |
void |
setOrderAlphabetically(boolean orderAlphabetically)
Sets the sort order.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public CompletionProposalComparator()
public void setOrderAlphabetically(boolean orderAlphabetically)
false
, i.e. order by
relevance.orderAlphabetically
- true
to order alphabetically,
false
to order by relevancepublic int compare(ICompletionProposal p1, ICompletionProposal p2)
compare
in interface Comparator<ICompletionProposal>
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.