dip.order.result
Class SubstitutedResult

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

public class SubstitutedResult
extends OrderResult

If an adjudicator replaces an order (because it is invalid, for example) or creates an order (because no order was given), a SubstitutedResult is created.

getOrder() may return null if an order was added, and no previous order existed. However, getPower() will not; the power is set from the new order.

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
SubstitutedResult(Orderable oldOrder, Orderable newOrder, java.lang.String message)
          Create a SubstitutedResult.
 
Method Summary
 Orderable getSubstitutedOrder()
          Returns the substituted (new) order that replaces the old order (or no order, if an order was created).
 java.lang.String toString()
          This is intended for debugging only.
 
Methods inherited from class dip.order.result.OrderResult
compareTo, getOrder, getResultType
 
Methods inherited from class dip.order.result.Result
getMessage, getMessage, getPower
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SubstitutedResult

public SubstitutedResult(Orderable oldOrder,
                         Orderable newOrder,
                         java.lang.String message)
Create a SubstitutedResult. Note that oldOrder may be null, but newOrder is not allowed to be null.

Method Detail

getSubstitutedOrder

public Orderable getSubstitutedOrder()
Returns the substituted (new) order that replaces the old order (or no order, if an order was created).


toString

public java.lang.String toString()
This is intended for debugging only.

Overrides:
toString in class OrderResult


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