dip.order
Class Waive

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

public class Waive
extends Order

A Waive order; a power may explicitly choose not to build a unit. in that case, a Waive order may be issued.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class dip.order.Order
ORD_VAL_BORDER, power, src, srcUnitType
 
Constructor Summary
protected Waive()
          Creates a Waive order
protected Waive(Power power, Location src)
          Creates a Waive order
 
Method Summary
 void determineDependencies(Adjudicator adjudicator)
          Empty method: Waive orders do not require dependency determination.
 boolean equals(java.lang.Object obj)
          Determines if the orders are equal.
 void evaluate(Adjudicator adjudicator)
          Waive orders are always successful.
 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)
          Very little is done to validate Waive orders; we only check the power and season.
 void verify(Adjudicator adjudicator)
          Waive 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

Waive

protected Waive(Power power,
                Location src)
Creates a Waive order


Waive

protected Waive()
Creates a Waive order

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
Very little is done to validate Waive orders; we only check the power and season. The adjudicator must check tricky situations, such as too many or too few build orders.

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)
Waive orders do not require verification.


determineDependencies

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


evaluate

public void evaluate(Adjudicator adjudicator)
Waive orders are always successful.

If there are too few waive orders, that is ok. If there are too many waive or build orders, extra build orders must be discarded by the Adjustment adjudicator as appropriate.

Extra build orders are NOT considered in the evaluate() method here.



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