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

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

public class SourceFluxSortKey
extends Object
implements Orderable, Comparator<SourceCatalogEntry>

Compares sources based on their flux density in a given receiver band.

Version Info:

$Revision$
$Date$
$Author$ (last person to modify)

Since:
2008-10-10
Author:
David M. Harland

Constructor Summary
SourceFluxSortKey()
          Creates a new key for sorting sources by their flux density at a particular receiver band.
 
Method Summary
 int compare(SourceCatalogEntry sce1, SourceCatalogEntry sce2)
           
 FluxDensity getFluxDensity(SourceCatalogEntry sce)
          Returns the flux density this sort key did, or would, use for the given source for the receiver band specified in setReceiverBand(ReceiverBand).
 SortOrder getOrder()
           
 void setOrder(SortOrder newOrder)
           
 void setReceiverBand(ReceiverBand newBand)
          Sets the receiver band for which flux densities will be sought from sources.
 
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

SourceFluxSortKey

public SourceFluxSortKey()
Creates a new key for sorting sources by their flux density at a particular receiver band.

Method Detail

getFluxDensity

public FluxDensity getFluxDensity(SourceCatalogEntry sce)
Returns the flux density this sort key did, or would, use for the given source for the receiver band specified in setReceiverBand(ReceiverBand).

Parameters:
sce - a celestial source.
Returns:
the flux density this sort key did, or would, use for the given source.

setReceiverBand

public void setReceiverBand(ReceiverBand newBand)
Sets the receiver band for which flux densities will be sought from sources.

Parameters:
newBand - a receiver band.

setOrder

public void setOrder(SortOrder newOrder)
Specified by:
setOrder in interface Orderable

getOrder

public SortOrder getOrder()
Specified by:
getOrder in interface Orderable

compare

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


Copyright © 2009. All Rights Reserved.