dip.order.result
Class DislodgedResult

java.lang.Object
  extended bydip.order.result.Result
      extended bydip.order.result.OrderResult
          extended bydip.order.result.DislodgedResult
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public class DislodgedResult
extends OrderResult

Similar to an OrderResult, but allows the optional specification of:

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class dip.order.result.OrderResult
OrderResult.ResultType
 
Field Summary
 
Fields inherited from class dip.order.result.OrderResult
order, resultType
 
Fields inherited from class dip.order.result.Result
message, power
 
Constructor Summary
DislodgedResult(Orderable order, Location[] retreatLocations)
           
DislodgedResult(Orderable order, java.lang.String message, Location[] retreatLocations)
           
 
Method Summary
 int getAttackStrength()
          Returns the attack strength, or -1 if it has not been set.
 int getDefenseStrength()
          Returns the defense strength, or -1 if it has not been set.
 Province getDislodger()
          Returns the dislodging units location, or null if it has not been set.
 java.lang.String getMessage(OrderFormatOptions ofo)
          Creates an appropriate internationalized text message given the set and unset parameters.
 Location[] getRetreatLocations()
          Returns the valid retreat locations, if set.
 void setAttackStrength(int value)
          Set the attack strength.
 void setDefenseStrength(int value)
          Set the defense strength.
 void setDislodger(Province value)
          Set the dislodger.
 java.lang.String toString()
          Primarily for debugging.
 
Methods inherited from class dip.order.result.OrderResult
compareTo, getOrder, getResultType
 
Methods inherited from class dip.order.result.Result
getMessage, getPower
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DislodgedResult

public DislodgedResult(Orderable order,
                       Location[] retreatLocations)

DislodgedResult

public DislodgedResult(Orderable order,
                       java.lang.String message,
                       Location[] retreatLocations)
Method Detail

getRetreatLocations

public Location[] getRetreatLocations()
Returns the valid retreat locations, if set. If no retreat locations have been defined, this will return null.


getAttackStrength

public int getAttackStrength()
Returns the attack strength, or -1 if it has not been set.


getDefenseStrength

public int getDefenseStrength()
Returns the defense strength, or -1 if it has not been set.


getDislodger

public Province getDislodger()
Returns the dislodging units location, or null if it has not been set.


setAttackStrength

public void setAttackStrength(int value)
Set the attack strength. A value of -1 indicates that this has not been set.


setDefenseStrength

public void setDefenseStrength(int value)
Set the defense strength. A value of -1 indicates that this has not been set.


setDislodger

public void setDislodger(Province value)
Set the dislodger. A value of null indicates that this has not been set.


getMessage

public java.lang.String getMessage(OrderFormatOptions ofo)
Creates an appropriate internationalized text message given the set and unset parameters.

Overrides:
getMessage in class Result

toString

public java.lang.String toString()
Primarily for debugging.

Overrides:
toString in class OrderResult


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