kerho
Class Jasenet.JasenVertailija

java.lang.Object
  extended by kerho.Jasenet.JasenVertailija
All Implemented Interfaces:
Comparator<Jasen>
Enclosing class:
Jasenet

public static class Jasenet.JasenVertailija
extends Object
implements Comparator<Jasen>

Luokka joka vertaa kahta jäsentä keskenään


Constructor Summary
Jasenet.JasenVertailija()
           
 
Method Summary
 int compare(Jasen j1, Jasen j2)
          Verrataana kahta jäsentä keskenään.
 
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

Jasenet.JasenVertailija

public Jasenet.JasenVertailija()
Method Detail

compare

public int compare(Jasen j1,
                   Jasen j2)
Verrataana kahta jäsentä keskenään.

Specified by:
compare in interface Comparator<Jasen>
Parameters:
j1 - 1. verrattava jäsen
j2 - 2. verrattava jäsen
Returns:
<0 jos j1 < j2, == 0 jos j1 == j2 ja muuten >0