nom.tam.fits
Class HeaderOrder

java.lang.Object
  extended by nom.tam.fits.HeaderOrder
All Implemented Interfaces:
java.util.Comparator

public class HeaderOrder
extends java.lang.Object
implements java.util.Comparator

This class implements a comparator which ensures that FITS keywords are written out in a proper order.


Constructor Summary
HeaderOrder()
           
 
Method Summary
 int compare(java.lang.Object a, java.lang.Object b)
          Which order should the cards indexed by these keys be written out? This method assumes that the arguments are either the FITS Header keywords as strings, and some other type (or null) for comment style keywords.
 boolean equals(java.lang.Object a, java.lang.Object b)
          Can two cards be exchanged when being written out?
 
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

HeaderOrder

public HeaderOrder()
Method Detail

equals

public boolean equals(java.lang.Object a,
                      java.lang.Object b)
Can two cards be exchanged when being written out?


compare

public int compare(java.lang.Object a,
                   java.lang.Object b)
Which order should the cards indexed by these keys be written out? This method assumes that the arguments are either the FITS Header keywords as strings, and some other type (or null) for comment style keywords.

Specified by:
compare in interface java.util.Comparator
Returns:
-1 if the first argument should be written first
1 if the second argument should be written first
0 if either is legal.