org.opensha.sha.earthquake.util
Class EqkSourceNameComparator

java.lang.Object
  extended by org.opensha.sha.earthquake.util.EqkSourceNameComparator
All Implemented Interfaces:
Comparator<ProbEqkSource>

public class EqkSourceNameComparator
extends Object
implements Comparator<ProbEqkSource>


Constructor Summary
EqkSourceNameComparator()
           
 
Method Summary
 int compare(ProbEqkSource s1, ProbEqkSource s2)
          This is called when you do Arrays.sort on an array or Collections.sort on a collection (IE ArrayList).
 
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

EqkSourceNameComparator

public EqkSourceNameComparator()
Method Detail

compare

public int compare(ProbEqkSource s1,
                   ProbEqkSource s2)
This is called when you do Arrays.sort on an array or Collections.sort on a collection (IE ArrayList). It simply compares their names using a Collator.

Specified by:
compare in interface Comparator<ProbEqkSource>