games.strategy.triplea.delegate
Class UnitComparator

java.lang.Object
  extended by games.strategy.triplea.delegate.UnitComparator

public class UnitComparator
extends java.lang.Object


Constructor Summary
UnitComparator()
           
 
Method Summary
static java.util.Comparator<Unit> getDecreasingAttackComparator(PlayerID player)
           
static java.util.Comparator<Unit> getDecreasingCapacityComparator(java.util.List<Unit> transports)
           
static java.util.Comparator<Unit> getDecreasingMovementComparator()
           
static java.util.Comparator<Unit> getIncreasingCapacityComparator(java.util.List<Unit> transports)
           
static java.util.Comparator<Unit> getIncreasingMovementComparator()
           
static java.util.Comparator<Unit> getLoadableTransportsComparator(java.util.List<Unit> transports, Route route, PlayerID player, boolean noTies)
          Return a Comparator that will order the specified transports in preferred load order.
static java.util.Comparator<Unit> getMovableUnitsComparator(java.util.List<Unit> units, Route route, PlayerID player, boolean noTies)
          Return a Comparator that will order the specified units in preferred move order.
static java.util.Comparator<Unit> getUnloadableTransportsComparator(java.util.List<Unit> transports, Route route, PlayerID player, boolean noTies)
          Return a Comparator that will order the specified transports in preferred unload order.
static java.util.Comparator<Unit> getUnloadableUnitsComparator(java.util.List<Unit> units, Route route, PlayerID player, boolean noTies)
          Return a Comparator that will order the specified units in preferred unload order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnitComparator

public UnitComparator()
Method Detail

getDecreasingMovementComparator

public static java.util.Comparator<Unit> getDecreasingMovementComparator()

getIncreasingMovementComparator

public static java.util.Comparator<Unit> getIncreasingMovementComparator()

getIncreasingCapacityComparator

public static java.util.Comparator<Unit> getIncreasingCapacityComparator(java.util.List<Unit> transports)

getDecreasingCapacityComparator

public static java.util.Comparator<Unit> getDecreasingCapacityComparator(java.util.List<Unit> transports)

getLoadableTransportsComparator

public static java.util.Comparator<Unit> getLoadableTransportsComparator(java.util.List<Unit> transports,
                                                                         Route route,
                                                                         PlayerID player,
                                                                         boolean noTies)
Return a Comparator that will order the specified transports in preferred load order.


getUnloadableTransportsComparator

public static java.util.Comparator<Unit> getUnloadableTransportsComparator(java.util.List<Unit> transports,
                                                                           Route route,
                                                                           PlayerID player,
                                                                           boolean noTies)
Return a Comparator that will order the specified transports in preferred unload order.


getMovableUnitsComparator

public static java.util.Comparator<Unit> getMovableUnitsComparator(java.util.List<Unit> units,
                                                                   Route route,
                                                                   PlayerID player,
                                                                   boolean noTies)
Return a Comparator that will order the specified units in preferred move order.


getUnloadableUnitsComparator

public static java.util.Comparator<Unit> getUnloadableUnitsComparator(java.util.List<Unit> units,
                                                                      Route route,
                                                                      PlayerID player,
                                                                      boolean noTies)
Return a Comparator that will order the specified units in preferred unload order. If needed it may also inspect the transport holding the units.


getDecreasingAttackComparator

public static java.util.Comparator<Unit> getDecreasingAttackComparator(PlayerID player)