stella.jview
Class JObjectDisplay.TargetComparator

java.lang.Object
  extended by stella.jview.JObjectDisplay.TargetComparator
All Implemented Interfaces:
Comparator<Map.Entry<String,StarDescription>>
Enclosing class:
JObjectDisplay

private static class JObjectDisplay.TargetComparator
extends Object
implements Comparator<Map.Entry<String,StarDescription>>

A helper class that can compare either the names of the targets or the ra of its main star. If constructed with true, then target names are compared. If both star happen to have the same RA and RA ordering is requested, the alphabetic comparison is returned.


Field Summary
(package private)  boolean alphabetically
           
 
Constructor Summary
JObjectDisplay.TargetComparator(boolean alpha)
           
 
Method Summary
 int compare(Map.Entry<String,StarDescription> s1, Map.Entry<String,StarDescription> s2)
           
 
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
 

Field Detail

alphabetically

boolean alphabetically
Constructor Detail

JObjectDisplay.TargetComparator

JObjectDisplay.TargetComparator(boolean alpha)
Method Detail

compare

public int compare(Map.Entry<String,StarDescription> s1,
                   Map.Entry<String,StarDescription> s2)
Specified by:
compare in interface Comparator<Map.Entry<String,StarDescription>>