|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dip.order.result.Result
A Result is a message that is sent from the adjudicator back to a power or all powers concerning turn processing.
Result and subclasses have a toString() method, which is intended for debugging. To obtain a properly-formatted localized message, use getMessage().
Field Summary | |
protected java.lang.String |
message
The Message text; this must never be null |
protected Power |
power
The Power to whom this Result applies; null if it applies to everyone |
Constructor Summary | |
protected |
Result()
no-arg constructor for subclasses |
|
Result(Power power,
java.lang.String message)
Create a Result, that is for the given Power. |
|
Result(java.lang.String message)
Create a Result that is applicable to all Powers. |
Method Summary | |
int |
compareTo(java.lang.Object o)
Compare first by Power, then by Message. |
java.lang.String |
getMessage()
Get the message. |
java.lang.String |
getMessage(OrderFormatOptions ofo)
Get the message. |
Power |
getPower()
Get the Power (or null if none) for whom this result is intended. |
java.lang.String |
toString()
For debugging. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Power power
protected java.lang.String message
Constructor Detail |
protected Result()
public Result(Power power, java.lang.String message)
public Result(java.lang.String message)
Method Detail |
public Power getPower()
public final java.lang.String getMessage()
getMessage(OrderFormatOptions.DEFAULT)
.
This method is marked final
so that subclasses more
properly override the getMessage(OrderFormatOptions)
method.
public java.lang.String getMessage(OrderFormatOptions ofo)
null
.
Uses the given order format options (if applicable) for formatting Province and Order names. Subclasses must override this method to implement this.
public java.lang.String toString()
public int compareTo(java.lang.Object o)
If power is null, it will be first in ascending order. If message may be empty, but never is null.
compareTo
in interface java.lang.Comparable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |