Package adams.flow.core
Class DefaultActorComparator
- java.lang.Object
-
- adams.flow.core.DefaultActorComparator
-
- All Implemented Interfaces:
ActorComparator
,Comparator<Actor>
public class DefaultActorComparator extends Object implements ActorComparator
Simply uses the (lowercase) name of the actors for comparison.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Constructor Summary
Constructors Constructor Description DefaultActorComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Actor o1, Actor o2)
For comparing actors.-
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, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
compare
public int compare(Actor o1, Actor o2)
For comparing actors.- Specified by:
compare
in interfaceActorComparator
- Specified by:
compare
in interfaceComparator<Actor>
- Parameters:
o1
- the first actoro2
- the second actor- Returns:
- less than, equal to, or greater than if the first actor is less than, equal to, or greater than the second actor
-
-