edu.nrao.sss.model.source.sort
Class SourceNameSortKey

java.lang.Object
  extended by edu.nrao.sss.sort.SortKey<String>
      extended by edu.nrao.sss.sort.StringSortKey
          extended by edu.nrao.sss.model.source.sort.SourceNameSortKey
All Implemented Interfaces:
Orderable, Comparator<SourceCatalogEntry>

public class SourceNameSortKey
extends StringSortKey
implements Comparator<SourceCatalogEntry>

Sorts sources based on their names.

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: 599 $
$Date: 2007-05-09 08:26:20 -0600 (Wed, 09 May 2007) $
$Author: dharland $

Since:
2007-05-08
Author:
David M. Harland

Constructor Summary
SourceNameSortKey()
           
 
Method Summary
 int compare(SourceCatalogEntry sce1, SourceCatalogEntry sce2)
           
 
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

SourceNameSortKey

public SourceNameSortKey()
Method Detail

compare

public int compare(SourceCatalogEntry sce1,
                   SourceCatalogEntry sce2)
Specified by:
compare in interface Comparator<SourceCatalogEntry>


Copyright © 2009. All Rights Reserved.