dip.judge.parser
Class JudgeOrderParser

java.lang.Object
  extended bydip.judge.parser.JudgeOrderParser

public class JudgeOrderParser
extends java.lang.Object

Parses Move, Retreat, and Adjustment phase orders.

This assumes that orders never span lines.


Field Summary
static java.lang.String ADJUSTMENT_ORDER_HEADER
          Header for recognizing the adjustment order block.
static java.lang.String GAME_STARTING_HEADER
          Header for recognizing the start of game block
static java.lang.String MOVE_ORDER_HEADER
          Header for recognizing the movement order block
static java.lang.String RETREAT_ORDER_HEADER
          Header for recognizing the retreat order block.
static java.lang.String SEASON_YEAR_REGEX
          Parse Season and Year for these orders
static java.lang.String STARTING_POSITION_REGEX
          Recognize the starting position header
 
Constructor Summary
JudgeOrderParser(Map map, OrderFactory orderFactory, java.lang.String input)
          Create a JudgeOrderParser
 
Method Summary
 NJudgeOrderParser.NJudgeOrder[] getNJudgeOrders()
          Returns the NJudgeOrder(s) after parsing.
 Phase.PhaseType getPhaseType()
          Returns the phase of the processed orders.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEASON_YEAR_REGEX

public static final java.lang.String SEASON_YEAR_REGEX
Parse Season and Year for these orders

See Also:
Constant Field Values

GAME_STARTING_HEADER

public static final java.lang.String GAME_STARTING_HEADER
Header for recognizing the start of game block

See Also:
Constant Field Values

STARTING_POSITION_REGEX

public static final java.lang.String STARTING_POSITION_REGEX
Recognize the starting position header

See Also:
Constant Field Values

MOVE_ORDER_HEADER

public static final java.lang.String MOVE_ORDER_HEADER
Header for recognizing the movement order block

See Also:
Constant Field Values

RETREAT_ORDER_HEADER

public static final java.lang.String RETREAT_ORDER_HEADER
Header for recognizing the retreat order block.
Note that older nJudge versions use "retreat orders for" while newer versions use "retreat results for".

See Also:
Constant Field Values

ADJUSTMENT_ORDER_HEADER

public static final java.lang.String ADJUSTMENT_ORDER_HEADER
Header for recognizing the adjustment order block.
Note that older nJudge versions use "adjustment orders for" while newer versions use "adjustment results for".

See Also:
Constant Field Values
Constructor Detail

JudgeOrderParser

public JudgeOrderParser(Map map,
                        OrderFactory orderFactory,
                        java.lang.String input)
                 throws java.io.IOException,
                        java.util.regex.PatternSyntaxException
Create a JudgeOrderParser

Method Detail

getPhaseType

public Phase.PhaseType getPhaseType()
Returns the phase of the processed orders. This is null when getOrderInfo() is zero-length.


getNJudgeOrders

public NJudgeOrderParser.NJudgeOrder[] getNJudgeOrders()
Returns the NJudgeOrder(s) after parsing. This is never null, but may be a zero-length array.



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