dip.world
Class Phase.PhaseType

java.lang.Object
  extended bydip.world.Phase.PhaseType
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable
Enclosing class:
Phase

public static class Phase.PhaseType
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

PhaseTypes represent game phases. For example, MOVEMENT or RETREAT phases.

PhaseType constants should be used instead of creating new PhaseType objects.

See Also:
Serialized Form

Field Summary
static Phase.PhaseType ADJUSTMENT
          Adjustment PhaseType
static Phase.PhaseType[] ALL
          PhaseType array Warning: this should not be mutated.
protected static java.lang.String CONST_ADJUSTMENT
           
protected static java.lang.String CONST_MOVEMENT
           
protected static java.lang.String CONST_RETREAT
           
protected  java.lang.String constName
           
protected  java.lang.String displayName
           
protected static java.lang.String IL8N_ADJUSTMENT
           
protected static java.lang.String IL8N_MOVEMENT
           
protected static java.lang.String IL8N_RETREAT
           
static Phase.PhaseType MOVEMENT
          Movement PhaseType
protected static int POS_ADJUSTMENT
           
protected static int POS_MOVEMENT
           
protected static int POS_RETREAT
           
protected  int position
           
static Phase.PhaseType RETREAT
          Retreat PhaseType
 
Constructor Summary
protected Phase.PhaseType(java.lang.String cName, int pos, java.lang.String il8nKey)
          Create a new PhaseType
 
Method Summary
 int compareTo(java.lang.Object obj)
          Temporally compares PhaseType objects
 boolean equals(java.lang.Object obj)
          Returns true if PhaseType objects are equivalent
 java.lang.String getBriefName()
          Brief name of a Phase (e.g., [B]uild, [R]etreat [M]ove
 Phase.PhaseType getNext()
          Get the next PhaseType, in sequence.
 Phase.PhaseType getPrevious()
          Get the previous PhaseType, in sequence.
 int hashCode()
          Returns the hashCode
static Phase.PhaseType parse(java.lang.String in)
          Returns the appropriate PhaseType constant representing the input, or null.
protected  java.lang.Object readResolve()
          Resolves a serialized Phase object into a constant reference
 java.lang.String toString()
          Get the name of a phase
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CONST_ADJUSTMENT

protected static final java.lang.String CONST_ADJUSTMENT
See Also:
Constant Field Values

CONST_MOVEMENT

protected static final java.lang.String CONST_MOVEMENT
See Also:
Constant Field Values

CONST_RETREAT

protected static final java.lang.String CONST_RETREAT
See Also:
Constant Field Values

IL8N_ADJUSTMENT

protected static final java.lang.String IL8N_ADJUSTMENT
See Also:
Constant Field Values

IL8N_MOVEMENT

protected static final java.lang.String IL8N_MOVEMENT
See Also:
Constant Field Values

IL8N_RETREAT

protected static final java.lang.String IL8N_RETREAT
See Also:
Constant Field Values

POS_MOVEMENT

protected static final int POS_MOVEMENT
See Also:
Constant Field Values

POS_RETREAT

protected static final int POS_RETREAT
See Also:
Constant Field Values

POS_ADJUSTMENT

protected static final int POS_ADJUSTMENT
See Also:
Constant Field Values

ADJUSTMENT

public static final Phase.PhaseType ADJUSTMENT
Adjustment PhaseType


MOVEMENT

public static final Phase.PhaseType MOVEMENT
Movement PhaseType


RETREAT

public static final Phase.PhaseType RETREAT
Retreat PhaseType


ALL

public static final Phase.PhaseType[] ALL
PhaseType array Warning: this should not be mutated.


displayName

protected transient java.lang.String displayName

constName

protected final java.lang.String constName

position

protected final int position
Constructor Detail

Phase.PhaseType

protected Phase.PhaseType(java.lang.String cName,
                          int pos,
                          java.lang.String il8nKey)
Create a new PhaseType

Method Detail

toString

public java.lang.String toString()
Get the name of a phase


getBriefName

public java.lang.String getBriefName()
Brief name of a Phase (e.g., [B]uild, [R]etreat [M]ove


hashCode

public int hashCode()
Returns the hashCode


equals

public boolean equals(java.lang.Object obj)
Returns true if PhaseType objects are equivalent


compareTo

public int compareTo(java.lang.Object obj)
Temporally compares PhaseType objects

Specified by:
compareTo in interface java.lang.Comparable

getNext

public Phase.PhaseType getNext()
Get the next PhaseType, in sequence.


getPrevious

public Phase.PhaseType getPrevious()
Get the previous PhaseType, in sequence.


parse

public static Phase.PhaseType parse(java.lang.String in)
Returns the appropriate PhaseType constant representing the input, or null.

Plurals are allowable on constants, but not in il8n versions.


readResolve

protected java.lang.Object readResolve()
                                throws java.io.ObjectStreamException
Resolves a serialized Phase object into a constant reference

Throws:
java.io.ObjectStreamException


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