org.opensha.sha.earthquake.observedEarthquake
Class ObsEqkRupOrigTimeComparator

java.lang.Object
  extended by org.opensha.sha.earthquake.observedEarthquake.ObsEqkRupOrigTimeComparator
All Implemented Interfaces:
Serializable, Comparator<ObsEqkRupture>

public class ObsEqkRupOrigTimeComparator
extends Object
implements Comparator<ObsEqkRupture>, Serializable

Title: ObsEqkRupEventOriginTimeComparator

Description: This compares 2 observed ObsEqkRupture objects based on their origin time.

Version:
1.0
Author:
Nitin Gupta, rewritten by Ned Field
See Also:
Serialized Form

Constructor Summary
ObsEqkRupOrigTimeComparator()
           
 
Method Summary
 int compare(ObsEqkRupture rupEvent1, ObsEqkRupture rupEvent2)
          Compares the origin times of the two arguments.
 
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

ObsEqkRupOrigTimeComparator

public ObsEqkRupOrigTimeComparator()
Method Detail

compare

public int compare(ObsEqkRupture rupEvent1,
                   ObsEqkRupture rupEvent2)
Compares the origin times of the two arguments. Returns negative one, zero, or positive one depending on whether the first origin time is less than, equal to, or greater than the second, respectively.

Specified by:
compare in interface Comparator<ObsEqkRupture>