edu.nrao.sss.model.resource.sort
Class CommentsSortKey

java.lang.Object
  extended by edu.nrao.sss.sort.SortKey<String>
      extended by edu.nrao.sss.sort.StringSortKey
          extended by edu.nrao.sss.model.resource.sort.CommentsSortKey
All Implemented Interfaces:
Orderable, Comparator<Resource>

public class CommentsSortKey
extends StringSortKey
implements Comparator<Resource>

Sorts resources based on their first Note (comments field).

Because this class is a SortKey, you may configure its instances with a particular SortOrder. Because it is a StringSortKey, you may tell it to ignore differences in case. Finally, because it is a Comparator, you may use it for sorting collections on its own, or place it in a CompoundComparator to use as one of many keys in a single sort.

The default values for this key's attributes are:

Version Info:

$Revision: 1710 $
$Date: 2008-11-14 11:54:07 -0700 (Fri, 14 Nov 2008) $
$Author: dharland $


Constructor Summary
CommentsSortKey()
           
 
Method Summary
 int compare(Resource a, Resource b)
           
 
Methods inherited from class edu.nrao.sss.sort.StringSortKey
compareAscending, compareNatural, setIgnoreCase
 
Methods inherited from class edu.nrao.sss.sort.SortKey
compareObjects, compareObjects, getOrder, nullOrdering, objectsAreEqual, setOrder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

CommentsSortKey

public CommentsSortKey()
Method Detail

compare

public int compare(Resource a,
                   Resource b)
Specified by:
compare in interface Comparator<Resource>


Copyright © 2009. All Rights Reserved.