Class RandomStrategy
java.lang.Object
|
+--ACraneStrategy
|
+--RandomStrategy
- public class RandomStrategy
- extends ACraneStrategy
Strategy that picks add locations at random.
Method Summary |
protected Point |
getAddLocation(Parcel aParcel)
Returns a random location at which
to try to add the given parcel. |
String |
getName()
Returns the name of this. |
protected Point |
getRemoveLocation(Order anOrder)
Returns a location from which
to remove a parcel in the given order. |
Methods inherited from class ACraneStrategy |
addOrder, beginAdd, beginRemove, installInto, orderNumberAt, parcelAdded, parcelPlacedAt, parcelRemoved, parcelRemovedFrom, quit, removeOrder, reset |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomStrategy
public RandomStrategy()
- Constructs a random strategy.
getName
public String getName()
- Returns the name of this.
- Specified by:
getName
in class ACraneStrategy
getAddLocation
protected Point getAddLocation(Parcel aParcel)
- Returns a random location at which
to try to add the given parcel.
- Overrides:
getAddLocation
in class ACraneStrategy
- Parameters:
aParcel
- parcel to be added (ignored)
getRemoveLocation
protected Point getRemoveLocation(Order anOrder)
- Returns a location from which
to remove a parcel in the given order.
- Overrides:
getRemoveLocation
in class ACraneStrategy
- Parameters:
anOrder
- order to be removed