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

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.SearchResultSorterDescription

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

Sorts search results by description.

Author:
Rob Elves

Field Summary
private  TaskKeyComparator taskKeyComparator
           
 
Fields inherited from class org.eclipse.jface.viewers.ViewerSorter
collator
 
Constructor Summary
SearchResultSorterDescription()
           
 
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 description goes before, is the same as, or goes after the second element's description.
 
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
 

Field Detail

taskKeyComparator

private TaskKeyComparator taskKeyComparator
Constructor Detail

SearchResultSorterDescription

public SearchResultSorterDescription()
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 description goes before, is the same as, or goes after the second element's description.

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)