dip.order
Class NJudgeOrderParser.NJudgeOrder

java.lang.Object
  extended bydip.order.NJudgeOrderParser.NJudgeOrder
Enclosing class:
NJudgeOrderParser

public static class NJudgeOrderParser.NJudgeOrder
extends java.lang.Object

Class that holds an Order and Text Results


Constructor Summary
NJudgeOrderParser.NJudgeOrder(Orderable order, java.util.List results, boolean isAdjustmentPhase)
          Create an NJudgeOrder, which is an Orderable with a dip.order.Result result(s).
NJudgeOrderParser.NJudgeOrder(Orderable order, Result aResult, boolean isAdjustmentPhase)
          Create an NJudgeOrder
NJudgeOrderParser.NJudgeOrder(Power power, int unusedPendingBuilds, int unusedPendingWaives, Result result)
          Create an Adjustment-phase NJudgeOrder for unused pending Builds, or pending Waives, but not both.
NJudgeOrderParser.NJudgeOrder(Power power, Result result)
          Create an Adjustment-phase NJudgeOrder for a Waived Build.
 
Method Summary
 Power getAdjustmentPower()
          Returns the power for special adjustment orders, which are obtained via the methods: getUnusedPendingBuilds() getUnusedPendingWaives() isWaivedBuild() This will throw an IllegalStateException() if we are not in the adjustment phase.
 Orderable getOrder()
          Returns the Order
 java.util.List getResults()
          Returns the Results of the order.
 int getUnusedPendingBuilds()
          Returns the number of unused builds pending.
 int getUnusedPendingWaives()
          Returns the number of unused builds waived.
 boolean isAdjustmentPhase()
          Returns true if this is an PhaseType.ADJUSTMENT phase order.
 boolean isWaivedBuild()
          Returns if a Build has been waived..
 java.lang.String toString()
          For debugging only
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NJudgeOrderParser.NJudgeOrder

public NJudgeOrderParser.NJudgeOrder(Orderable order,
                                     java.util.List results,
                                     boolean isAdjustmentPhase)
Create an NJudgeOrder, which is an Orderable with a dip.order.Result result(s).


NJudgeOrderParser.NJudgeOrder

public NJudgeOrderParser.NJudgeOrder(Orderable order,
                                     Result aResult,
                                     boolean isAdjustmentPhase)
Create an NJudgeOrder


NJudgeOrderParser.NJudgeOrder

public NJudgeOrderParser.NJudgeOrder(Power power,
                                     int unusedPendingBuilds,
                                     int unusedPendingWaives,
                                     Result result)
Create an Adjustment-phase NJudgeOrder for unused pending Builds, or pending Waives, but not both. Also creates a Result for this.


NJudgeOrderParser.NJudgeOrder

public NJudgeOrderParser.NJudgeOrder(Power power,
                                     Result result)
Create an Adjustment-phase NJudgeOrder for a Waived Build. Also creates a Result for this.

Method Detail

getOrder

public Orderable getOrder()
Returns the Order


getResults

public java.util.List getResults()
Returns the Results of the order. Each item in the list is a subclass of dip.order.Result.


isAdjustmentPhase

public boolean isAdjustmentPhase()
Returns true if this is an PhaseType.ADJUSTMENT phase order.


getUnusedPendingBuilds

public int getUnusedPendingBuilds()
Returns the number of unused builds pending. This will be 0 if there are no unsed builds pending.

Note that this applies only to ADJUSTMENT phase orders. This will throw an IllegalStateException if !isAdjustmentPhase().


getUnusedPendingWaives

public int getUnusedPendingWaives()
Returns the number of unused builds waived. This will be 0 if no unused builds were waived.

Note that this applies only to ADJUSTMENT phase orders. This will throw an IllegalStateException if !isAdjustmentPhase().


isWaivedBuild

public boolean isWaivedBuild()
Returns if a Build has been waived.. Because nJudge Waive orders do not support a Province, and jDip Waive orders require a Province, Waive orders are not (yet) fully supported.

If this is NOT a waived build, this will return false.

This will be removed in a future version, when jDip-style Waive orders are fully supported.

Note that this applies only to ADJUSTMENT phase orders. This will throw an IllegalStateException if !isAdjustmentPhase().


getAdjustmentPower

public Power getAdjustmentPower()
Returns the power for special adjustment orders, which are obtained via the methods: This will throw an IllegalStateException() if we are not in the adjustment phase. This will return null if we are in the adjustment phase, but, none of isWaivedBuild() or getUnusedXXX() methods have been set.


toString

public java.lang.String toString()
For debugging only



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