|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dip.order.NJudgeOrderParser
Parses nJudge-format orders into Orders and Results
This handles all 3 phases (Movement, Retreat, and Adjustment).
Please note that knowledge of the phase is required prior to processing; for example, Retreat orders are used intead of Move orders when the phase is PhaseType.RETREAT. Similarly, since adjustment orders are in a format quite different from Movement or Retreat phase orders, a similar hint PhaseType.ADJUSTMENT is required.
Not all nJudge orders have a 1:1 mapping with jDip orders. For example, jDip waive orders currently require a Province; nJudge orders do not. Unusable waived builds and unusable pending builds, as well as waived builds, are not converted to orders but are denoted specifically in the returned NJudgeOrder. An informative text Result describes this.
Note that DISLOGDGED order results do not have valid retreat locations set. This cannot be done until further processing occurs.
Nested Class Summary | |
static class |
NJudgeOrderParser.NJudgeOrder
Class that holds an Order and Text Results |
Constructor Summary | |
NJudgeOrderParser()
Create an NJudgeOrderParser |
Method Summary | |
NJudgeOrderParser.NJudgeOrder |
parse(Map map,
OrderFactory orderFactory,
Phase.PhaseType phaseType,
java.lang.String line)
Parse a single line order. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NJudgeOrderParser()
Method Detail |
public NJudgeOrderParser.NJudgeOrder parse(Map map, OrderFactory orderFactory, Phase.PhaseType phaseType, java.lang.String line) throws OrderException
Null arguments are not permitted, except for phaseType. If phaseType is Phase.PhaseType.RETREAT, "Move" format orders will be made into Retreat orders, and convoyed moves will be disallowed.
OrderException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |