org.gjt.universe
Class Order
java.lang.Object
|
+--org.gjt.universe.Order
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- OrderColonize, OrderEngineering_001, OrderMove, OrderResearch_001, OrderShipBuild_001, OrderStation1_001, OrderStation2_001, OrderStationBuild_001, OrderTransfer, OrderTransitWormhole
- public abstract class Order
- extends java.lang.Object
- implements java.io.Serializable
This is the base class for all Order objects.
- See Also:
- Serialized Form
Constructor Summary |
Order()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Order
public Order()
process
public abstract boolean process()
- This method processes the appropriate order. If this method
returns a true, then the order is complete and can be
removed.
getKey
public abstract Index getKey()
getEstimatedTimeOfCompletion
public abstract int getEstimatedTimeOfCompletion()
getPercentageCompletion
public abstract float getPercentageCompletion()
atPosition
public abstract void atPosition(int i)
- This method handles anything that needs to be done when the order
is at a specific position int a queue.
Notes:
- The method *must* be able to be called multiple times at the
same position, because it almost certainly will be. It *must* handle
this situation correctly.
- The method *must not* count on having each position called int
order. Nor must it count on the position numbers being sequential --
if an order is inserted, it may be called with a higher number than
the previous time. Or, if an order is deleted, it may be called with
a number 2 or more below the last one it was called with. It is up to
the method to handle this appropriately.
submit
public abstract void submit()
delete
public abstract void delete()
getName
public java.lang.String getName()
Copyright © 2001 Universe Dev Team All Rights Reserved.