Package adams.gui.action
Class BaseActionComparator
- java.lang.Object
-
- adams.gui.action.BaseActionComparator
-
- All Implemented Interfaces:
Comparator<BaseAction>
public class BaseActionComparator extends Object implements Comparator<BaseAction>
Comparator for sortingBaseAction
(and derived classes). If both actions are derived fromBaseActionWithGroup
then the group gets taken into account as well.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Constructor Summary
Constructors Constructor Description BaseActionComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(BaseAction o1, BaseAction o2)
Compares its two arguments for order.-
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(BaseAction o1, BaseAction o2)
Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
Uses the text of the menu items for comparison.- Specified by:
compare
in interfaceComparator<BaseAction>
- Parameters:
o1
- the first object to be compared.o2
- the second object to be compared.- Returns:
- a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
-
-