Package megamek.common.pathfinder
Class MovePathFinder.MovePathLengthComparator
java.lang.Object
megamek.common.pathfinder.MovePathFinder.MovePathLengthComparator
- All Implemented Interfaces:
Comparator<MovePath>
- Enclosing class:
- MovePathFinder<C>
public static class MovePathFinder.MovePathLengthComparator
extends Object
implements Comparator<MovePath>
A MovePath comparator that compares number of steps. Generally used for
spheroids, which don't have the same velocity expenditure restrictions as
Aerodynes, however they can't compare based on MP like ground units.
Spheroids should be able to safely compare based upon path length.
Order paths with fewer steps first.
-
Constructor Summary
Constructors -
Method Summary
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
-
Constructor Details
-
MovePathLengthComparator
public MovePathLengthComparator()
-
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<MovePath>
-