dip.order
Class OrderFactory

java.lang.Object
  extended bydip.order.OrderFactory
Direct Known Subclasses:
GUIOrderFactory

public abstract class OrderFactory
extends java.lang.Object

Creates Orders..


Constructor Summary
protected OrderFactory()
          Creates an OrderFactory
 
Method Summary
abstract  Build createBuild(Power power, Location source, Unit.Type sourceUnitType)
          Creates a Build order
abstract  Convoy createConvoy(Power power, Location src, Unit.Type srcUnitType, Location convoySrc, Power convoyPower, Unit.Type convoySrcUnitType, Location convoyDest)
          Creates a Convoy order
abstract  DefineState createDefineState(Power power, Location source, Unit.Type sourceUnitType)
          Creates a DefineState order
abstract  Disband createDisband(Power power, Location source, Unit.Type sourceUnitType)
          Creates a Disband order
abstract  Hold createHold(Power power, Location source, Unit.Type sourceUnitType)
          Creates a Hold order
abstract  Move createMove(Power power, Location source, Unit.Type srcUnitType, Location dest)
          Creates a Move order
abstract  Move createMove(Power power, Location source, Unit.Type srcUnitType, Location dest, boolean isConvoying)
          Creates a Move order
abstract  Move createMove(Power power, Location src, Unit.Type srcUnitType, Location dest, java.util.List routes)
          Creates a Move order
abstract  Move createMove(Power power, Location src, Unit.Type srcUnitType, Location dest, Province[] convoyRoute)
          Creates a Move order
abstract  Remove createRemove(Power power, Location source, Unit.Type sourceUnitType)
          Creates a Remove order
abstract  Retreat createRetreat(Power power, Location source, Unit.Type srcUnitType, Location dest)
          Creates a Retreat order
abstract  Support createSupport(Power power, Location src, Unit.Type srcUnitType, Location supSrc, Power supPower, Unit.Type supUnitType)
          Creates a Support order, to Support a unit staying in place.
abstract  Support createSupport(Power power, Location src, Unit.Type srcUnitType, Location supSrc, Power supPower, Unit.Type supUnitType, Location supDest)
          Creates a Support order, to Support a unit moving (or staying in place, if supDest == null)
abstract  Waive createWaive(Power power, Location source)
          Creates a Waive order
static OrderFactory getDefault()
          Get the default OrderFactory, which is dip.order.OrderFactory.DefaultOrderFactory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrderFactory

protected OrderFactory()
Creates an OrderFactory

Method Detail

getDefault

public static OrderFactory getDefault()
Get the default OrderFactory, which is dip.order.OrderFactory.DefaultOrderFactory.

WARNING: this should NOT be used if there is any likelyhood of every wanting to use GUI orders (e.g., via GUIOrderFactory). GUI orders are completely compatible with regular orders, via the Orderable interface.

This method is mainly provided for convenience (e.g., command-line utilities).


createHold

public abstract Hold createHold(Power power,
                                Location source,
                                Unit.Type sourceUnitType)
Creates a Hold order


createMove

public abstract Move createMove(Power power,
                                Location source,
                                Unit.Type srcUnitType,
                                Location dest)
Creates a Move order


createMove

public abstract Move createMove(Power power,
                                Location source,
                                Unit.Type srcUnitType,
                                Location dest,
                                boolean isConvoying)
Creates a Move order


createMove

public abstract Move createMove(Power power,
                                Location src,
                                Unit.Type srcUnitType,
                                Location dest,
                                Province[] convoyRoute)
Creates a Move order


createMove

public abstract Move createMove(Power power,
                                Location src,
                                Unit.Type srcUnitType,
                                Location dest,
                                java.util.List routes)
Creates a Move order


createSupport

public abstract Support createSupport(Power power,
                                      Location src,
                                      Unit.Type srcUnitType,
                                      Location supSrc,
                                      Power supPower,
                                      Unit.Type supUnitType)
Creates a Support order, to Support a unit staying in place.


createSupport

public abstract Support createSupport(Power power,
                                      Location src,
                                      Unit.Type srcUnitType,
                                      Location supSrc,
                                      Power supPower,
                                      Unit.Type supUnitType,
                                      Location supDest)
Creates a Support order, to Support a unit moving (or staying in place, if supDest == null)


createConvoy

public abstract Convoy createConvoy(Power power,
                                    Location src,
                                    Unit.Type srcUnitType,
                                    Location convoySrc,
                                    Power convoyPower,
                                    Unit.Type convoySrcUnitType,
                                    Location convoyDest)
Creates a Convoy order


createRetreat

public abstract Retreat createRetreat(Power power,
                                      Location source,
                                      Unit.Type srcUnitType,
                                      Location dest)
Creates a Retreat order


createDisband

public abstract Disband createDisband(Power power,
                                      Location source,
                                      Unit.Type sourceUnitType)
Creates a Disband order


createBuild

public abstract Build createBuild(Power power,
                                  Location source,
                                  Unit.Type sourceUnitType)
Creates a Build order


createRemove

public abstract Remove createRemove(Power power,
                                    Location source,
                                    Unit.Type sourceUnitType)
Creates a Remove order


createWaive

public abstract Waive createWaive(Power power,
                                  Location source)
Creates a Waive order


createDefineState

public abstract DefineState createDefineState(Power power,
                                              Location source,
                                              Unit.Type sourceUnitType)
                                       throws OrderException
Creates a DefineState order

Throws:
OrderException


Copyright 2002-2004 Zachary DelProposto / jDip Development Team. All Rights Reserved.