|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--game.military.command.AbstractCommand
An abstract class to implement the order queue management. This class gives a basic implementation of a superior cammand, orders, and a displayable image.
| Constructor Summary | |
AbstractCommand()
Constructor. |
|
| Method Summary | |
int |
compareTo(java.lang.Object object)
|
protected abstract java.lang.String |
createName()
Return a name for this command. |
void |
dies()
Called when all units in the command are dead. |
float |
getAttackStrength()
Return the attack strength. |
Civilization |
getCivilization()
Get the owning civilization. |
HighCommand |
getHighCommand()
Get the high command. |
java.lang.String |
getName()
Return the name of this instance. |
Army |
getSuperior()
Get the next higher command. |
TaskForce |
getTaskForce()
Add task force - return a new level 2 command, inserting commands in between as needed. |
boolean |
merge(Command command)
Merge the other command with this one, removing the other command. |
Command |
newSubCommand()
Create a new sub-command. |
void |
setName(java.lang.String value)
Set the name of this instance. |
void |
setParent(java.lang.Object parent)
Special setter for the parser so the army knows which high command it belongs to. |
void |
setSuperior(Army value)
Set the superior command. |
void |
split(Command subCommand)
Split the specified sub-command off into a separate command at this level. |
java.lang.String |
structure()
Return a complete command structure. |
java.lang.String |
toString()
String representation. |
void |
transfer(Command subCommand)
Transfer sub-command. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface game.interfaces.Command |
addNewUnit, addTaskForceToList, cancelAllOrders, carryOutOrders, commandIterator, commandStructure, getNumberOfSubCommands, getNumberOfUnits, getPersonnel, hasSettlers, hasUnits, issueOrders, remove, structure, taskForceIterator |
| Methods inherited from interface game.interfaces.Combatant |
getCombatData |
| Constructor Detail |
public AbstractCommand()
| Method Detail |
public void setParent(java.lang.Object parent)
protected abstract java.lang.String createName()
public Civilization getCivilization()
getCivilization in interface Commandpublic HighCommand getHighCommand()
getHighCommand in interface Commandpublic Army getSuperior()
getSuperior in interface Commandpublic void setSuperior(Army value)
setSuperior in interface Commandvalue - the new superior command.public void setName(java.lang.String value)
setName in interface Commandvalue - the name to set.public java.lang.String getName()
getName in interface Commandpublic int compareTo(java.lang.Object object)
compareTo in interface java.lang.Comparablepublic void dies()
dies in interface Commandpublic Command newSubCommand()
newSubCommand in interface Commandpublic TaskForce getTaskForce()
getTaskForce in interface Commandpublic void transfer(Command subCommand)
transfer in interface CommandsubCommand - the sub-command to be transferred to this command.public boolean merge(Command command)
merge in interface Commandcommand - the other same level command.
public void split(Command subCommand)
split in interface CommandsubCommand - the sub-command to be transferred to a new command.public float getAttackStrength()
getAttackStrength in interface Commandpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String structure()
structure in interface Command
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||