dip.order
Class DefineState

java.lang.Object
  extended bydip.order.Order
      extended bydip.order.DefineState
All Implemented Interfaces:
Orderable, java.io.Serializable
Direct Known Subclasses:
GUIDefineState

public class DefineState
extends Order

Implementation of the Setup (DefineState) order.

This order is used to 'build' units, but typically cannot be issued.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class dip.order.Order
ORD_VAL_BORDER, power, src, srcUnitType
 
Constructor Summary
protected DefineState()
           
protected DefineState(Power power, Location src, Unit.Type srcUnit)
           
 
Method Summary
 void determineDependencies(Adjudicator adjudicator)
          Empty method: DefineState orders do not require dependency determination.
 boolean equals(java.lang.Object obj)
          Determines if the orders are equal.
 void evaluate(Adjudicator adjudicator)
          Empty method: DefineState orders do not require evaluation logic.
 java.lang.String getBriefName()
          Returns the Brief name of the Order (e.g., "H" for a Hold order)
 java.lang.String getDefaultFormat()
          Get the default OrderFormat String used to custom-format orders.
 java.lang.String getFullName()
          Returns the Full name of the Order (e.g., "Hold" for a Hold order)
 java.lang.String toBriefString()
          Prints the entire order, in a brief syntax
 java.lang.String toFullString()
          Prints the entire order, in a verbose syntax
 void validate(TurnState state, ValidationOptions valOpts, RuleOptions ruleOpts)
          DefineState orders will always fail validation.
 void verify(Adjudicator adjudicator)
          DefineState orders do not require verification.
 
Methods inherited from class dip.order.Order
addSupportsOfAndMovesToSource, appendBrief, appendFull, checkPower, checkSeasonAdjustment, checkSeasonMovement, checkSeasonRetreat, getPower, getSource, getSourceUnitType, getValidatedUnitType, toFormattedString, toString, validate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefineState

protected DefineState(Power power,
                      Location src,
                      Unit.Type srcUnit)
               throws OrderException

DefineState

protected DefineState()
Method Detail

getFullName

public java.lang.String getFullName()
Description copied from interface: Orderable
Returns the Full name of the Order (e.g., "Hold" for a Hold order)


getBriefName

public java.lang.String getBriefName()
Description copied from interface: Orderable
Returns the Brief name of the Order (e.g., "H" for a Hold order)


getDefaultFormat

public java.lang.String getDefaultFormat()
Description copied from interface: Orderable
Get the default OrderFormat String used to custom-format orders.


toBriefString

public java.lang.String toBriefString()
Description copied from interface: Orderable
Prints the entire order, in a brief syntax


toFullString

public java.lang.String toFullString()
Description copied from interface: Orderable
Prints the entire order, in a verbose syntax


equals

public boolean equals(java.lang.Object obj)
Description copied from class: Order
Determines if the orders are equal.

Note that full equality MUST be implemented for each subclassed Order object! Subclasses are advised to call the super method for assistance.

Overrides:
equals in class Order

validate

public void validate(TurnState state,
                     ValidationOptions valOpts,
                     RuleOptions ruleOpts)
              throws OrderException
DefineState orders will always fail validation.

Their use is mainly for certain types of order parsing (like setting up a game state). For example, dip.misc.TestSuite uses DefineState orders to define the units and their positions for a test scenario.

Specified by:
validate in interface Orderable
Overrides:
validate in class Order
Parameters:
state - Current turn state
valOpts - Current validation options
Throws:
OrderException

verify

public void verify(Adjudicator adjudicator)
DefineState orders do not require verification.


determineDependencies

public void determineDependencies(Adjudicator adjudicator)
Empty method: DefineState orders do not require dependency determination.


evaluate

public void evaluate(Adjudicator adjudicator)
Empty method: DefineState orders do not require evaluation logic.



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