org.mars_sim.msp.core.structure.construction
Class ConstructionStage

java.lang.Object
  extended by org.mars_sim.msp.core.structure.construction.ConstructionStage
All Implemented Interfaces:
Serializable

public class ConstructionStage
extends Object
implements Serializable

A construction stage of a construction site.

See Also:
Serialized Form

Field Summary
static String ADD_CONSTRUCTION_WORK_EVENT
           
static String ADD_SALVAGE_WORK_EVENT
           
 
Constructor Summary
ConstructionStage(ConstructionStageInfo info, ConstructionSite site)
          Constructor
 
Method Summary
 void addWorkTime(double workTime)
          Adds work time to the construction stage.
 double getCompletedWorkTime()
          Gets the completed work time on the stage.
 ConstructionStageInfo getInfo()
          Get the construction stage information.
 double getRequiredWorkTime()
          Gets the required work time for the stage.
 boolean isComplete()
          Checks if the stage is complete.
 boolean isSalvaging()
          Checks if the stage is salvaging.
 void setCompletedWorkTime(double completedWorkTime)
          Sets the completed work time on the stage.
 void setSalvaging(boolean isSalvaging)
          Sets if the stage is salvaging.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ADD_CONSTRUCTION_WORK_EVENT

public static final String ADD_CONSTRUCTION_WORK_EVENT
See Also:
Constant Field Values

ADD_SALVAGE_WORK_EVENT

public static final String ADD_SALVAGE_WORK_EVENT
See Also:
Constant Field Values
Constructor Detail

ConstructionStage

public ConstructionStage(ConstructionStageInfo info,
                         ConstructionSite site)
Constructor

Parameters:
info - the stage information.
Method Detail

getInfo

public ConstructionStageInfo getInfo()
Get the construction stage information.

Returns:
stage information.

getCompletedWorkTime

public double getCompletedWorkTime()
Gets the completed work time on the stage.

Returns:
work time (in millisols).

setCompletedWorkTime

public void setCompletedWorkTime(double completedWorkTime)
Sets the completed work time on the stage.

Parameters:
completedWorkTime - work time (in millisols).

getRequiredWorkTime

public double getRequiredWorkTime()
Gets the required work time for the stage.

Returns:
work time (in millisols).

addWorkTime

public void addWorkTime(double workTime)
Adds work time to the construction stage.

Parameters:
workTime - the work time (in millisols) to add.

isComplete

public boolean isComplete()
Checks if the stage is complete.

Returns:
true if stage is complete.

isSalvaging

public boolean isSalvaging()
Checks if the stage is salvaging.

Returns:
true if stage is salvaging.

setSalvaging

public void setSalvaging(boolean isSalvaging)
Sets if the stage is salvaging.

Parameters:
isSalvaging - true if staging is salvaging.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2013. All Rights Reserved.