org.simbrain.util
Class Comparator
java.lang.Object
org.simbrain.util.Comparator
- All Implemented Interfaces:
- Comparator
public class Comparator
- extends Object
- implements Comparator
Comparator is used to compare positions of PNodes.
|
Field Summary |
static int |
COMPARE_X
Compare PNodes by their x dimension. |
static int |
COMPARE_Y
Compare PNodes by their y dimension. |
|
Constructor Summary |
Comparator(int comparison)
Constructor for Comparator. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COMPARE_X
public static final int COMPARE_X
- Compare PNodes by their x dimension.
- See Also:
- Constant Field Values
COMPARE_Y
public static final int COMPARE_Y
- Compare PNodes by their y dimension.
- See Also:
- Constant Field Values
Comparator
public Comparator(int comparison)
- Constructor for Comparator.
- Parameters:
comparison - whether to compare by x or y dimension.
compare
public int compare(Object o1,
Object o2)
- Specified by:
compare in interface Comparator
- See Also:
Comparator