Class CompletionProposalComparator

  • All Implemented Interfaces:
    Comparator<ICompletionProposal>

    public final class CompletionProposalComparator
    extends Object
    implements Comparator<ICompletionProposal>
    Comparator for java completion proposals. Completion proposals can be sorted by relevance or alphabetically.

    Note: this comparator imposes orderings that are inconsistent with equals.

    Since:
    3.1
    • Constructor Detail

      • CompletionProposalComparator

        public CompletionProposalComparator()
        Creates a comparator that sorts by relevance.
    • Method Detail

      • setOrderAlphabetically

        public void setOrderAlphabetically​(boolean orderAlphabetically)
        Sets the sort order. Default is false, i.e. order by relevance.
        Parameters:
        orderAlphabetically - true to order alphabetically, false to order by relevance