|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dip.judge.parser.DislodgedParser
Parses the Dislodged block
Nested Class Summary | |
static class |
DislodgedParser.DislodgedInfo
A DislodgedInfo object is created for each dislodged unit. |
Field Summary | |
static java.lang.String |
DESTROYED_REGEX
capture groups: 1:power, 2:unit, 3:unit location (may be multi-word, needs to be trim()'d) NOTE: this may span >1 line; it ends with the period ('.') |
static java.lang.String |
DISLODGED_LINE_START
Dislodged line start text; all dislodged lines must start with this. |
static java.lang.String |
DISLODGED_REGEX
capture groups: 1:power, 2:unit, 3:unit location, 4:retreat list predicate (example: "xxx or yyy or zzz") w/o trailing '.' |
static java.lang.String |
DISLODGED_SPLIT_REGEX
splits the retreat list predicate; must be suitable for String.split() |
static java.lang.String |
HEADER_END_REGEX
End of header text to look for |
static java.lang.String |
HEADER_REGEX
Header text to look for |
Constructor Summary | |
DislodgedParser(Phase phase,
java.lang.String input)
Creates a DislodgedParser object, which parses the given input for a Dislodged (retreat) information block |
Method Summary | |
DislodgedParser.DislodgedInfo[] |
getDislodgedInfo()
Returns the dislodged units, or a zero-length array if no units were dislodged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String HEADER_REGEX
public static final java.lang.String HEADER_END_REGEX
public static final java.lang.String DISLODGED_LINE_START
public static final java.lang.String DISLODGED_REGEX
public static final java.lang.String DISLODGED_SPLIT_REGEX
public static final java.lang.String DESTROYED_REGEX
Constructor Detail |
public DislodgedParser(Phase phase, java.lang.String input) throws java.io.IOException
Method Detail |
public DislodgedParser.DislodgedInfo[] getDislodgedInfo()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |