|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdip.judge.parser.PositionParser
Parses static position list, if present. This is in game listings and also sometimes in history files (if from the start).
Nested Class Summary | |
static class |
PositionParser.PositionInfo
Details the position information |
Field Summary | |
static java.lang.String |
HEADER_REGEX_1
Header phrase 1 Capture groups: 1:season 2:year PhaseType is assumed to be movement. |
static java.lang.String |
HEADER_REGEX_2
Header phrase 2 Capture groups: 1:PhaseType 2:SeasonType 3:year |
static java.lang.String |
PARSE_REGEX
Capture groups: 1:power, 2:unit, 3:province Note: a space is not always present between the colon and the unit type. |
Constructor Summary | |
PositionParser(java.lang.String input)
Parses the input for Position information, if any is present. |
Method Summary | |
Phase |
getPhase()
Returns the Phase; this will be null if getPositionInfo() is a zero-length array |
PositionParser.PositionInfo[] |
getPositionInfo()
Returns PositionInfo, or a zero-length array |
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_1
public static final java.lang.String HEADER_REGEX_2
public static final java.lang.String PARSE_REGEX
Constructor Detail |
public PositionParser(java.lang.String input) throws java.io.IOException, java.util.regex.PatternSyntaxException
Method Detail |
public PositionParser.PositionInfo[] getPositionInfo()
public Phase getPhase()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |