dip.judge.parser
Class AdjustmentParser

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

public class AdjustmentParser
extends java.lang.Object

Parses the Adjustment information block.
This includes both supply center ownership, and build/removes.


Nested Class Summary
static class AdjustmentParser.AdjustInfo
          An AdjustInfo object is created for each power, and contains adjustment information
static class AdjustmentParser.OwnerInfo
          An OwnerInfo object is created for each power.
 
Field Summary
static java.lang.String ADJUST_REGEX
          Adjustment regex Capture groups: 1:power 2:# supply centers 3:#units 4:# to build or remove This is always fed a trimmed string, and assumed that it is always on one line.
static java.lang.String HEADER_REGEX
          Header text to look for
 
Constructor Summary
AdjustmentParser(Map map, java.lang.String input)
          Creates a AdjustmentParser object, which parses the given input for an Ownership and Adjustment info blocks
 
Method Summary
 AdjustmentParser.AdjustInfo[] getAdjustments()
          Returns an array of AdjustInfo objects; this never returns null.
 AdjustmentParser.OwnerInfo[] getOwnership()
          Returns an array of OwnerInfo objects; this never returns null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HEADER_REGEX

public static final java.lang.String HEADER_REGEX
Header text to look for

See Also:
Constant Field Values

ADJUST_REGEX

public static final java.lang.String ADJUST_REGEX
Adjustment regex Capture groups: 1:power 2:# supply centers 3:#units 4:# to build or remove This is always fed a trimmed string, and assumed that it is always on one line. But we search a whole block. case-insensitive. Power names: alphanumeric + "-" and "_" supported. Parsed on a per-line basis.

See Also:
Constant Field Values
Constructor Detail

AdjustmentParser

public AdjustmentParser(Map map,
                        java.lang.String input)
                 throws java.io.IOException
Creates a AdjustmentParser object, which parses the given input for an Ownership and Adjustment info blocks

Method Detail

getOwnership

public AdjustmentParser.OwnerInfo[] getOwnership()
Returns an array of OwnerInfo objects; this never returns null.


getAdjustments

public AdjustmentParser.AdjustInfo[] getAdjustments()
Returns an array of AdjustInfo objects; this never returns null.



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