org.eclipse.mylar.internal.tasks.ui.search
Class SearchResultSorterPriority

java.lang.Object
  extended by org.eclipse.jface.viewers.ViewerComparator
      extended by org.eclipse.jface.viewers.ViewerSorter
          extended by org.eclipse.mylar.internal.tasks.ui.search.SearchResultSorterPriority

public class SearchResultSorterPriority
extends org.eclipse.jface.viewers.ViewerSorter

Sorts results of Bugzilla search by bug priority.

Author:
Rob Elves (modifications)

Field Summary
 
Fields inherited from class org.eclipse.jface.viewers.ViewerSorter
collator
 
Constructor Summary
SearchResultSorterPriority()
           
 
Method Summary
 int category(java.lang.Object element)
          Returns the category of the given element.
 int compare(org.eclipse.jface.viewers.Viewer viewer, java.lang.Object e1, java.lang.Object e2)
          Returns a negative, zero, or positive number depending on whether the first bug's priority goes before, is the same as, or goes after the second element's priority.
 
Methods inherited from class org.eclipse.jface.viewers.ViewerSorter
getCollator, getComparator
 
Methods inherited from class org.eclipse.jface.viewers.ViewerComparator
isSorterProperty, sort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchResultSorterPriority

public SearchResultSorterPriority()
Method Detail

compare

public int compare(org.eclipse.jface.viewers.Viewer viewer,
                   java.lang.Object e1,
                   java.lang.Object e2)
Returns a negative, zero, or positive number depending on whether the first bug's priority goes before, is the same as, or goes after the second element's priority.

Overrides:
compare in class org.eclipse.jface.viewers.ViewerComparator
See Also:
ViewerComparator.compare(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)

category

public int category(java.lang.Object element)
Returns the category of the given element. The category is a number used to allocate elements to bins; the bins are arranged in ascending numeric order. The elements within a bin are arranged via a second level sort criterion.

Overrides:
category in class org.eclipse.jface.viewers.ViewerComparator
See Also:
ViewerComparator.category(Object)