Class Homebase
- java.lang.Object
- 
- jadex.bdi.examples.marsworld_classic.LocationObject
- 
- jadex.bdi.examples.marsworld_classic.Homebase
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable
 
 public class Homebase extends LocationObject The agents homebase.- See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected IClockServiceclockThe clock.protected longmissiontimeThe mission time.protected intoreThe currently collected ore amount.protected longstarttimeThe start time.- 
Fields inherited from class jadex.bdi.examples.marsworld_classic.LocationObjectid, location
 
- 
 - 
Constructor SummaryConstructors Constructor Description Homebase(Location loc, long missiontime, IClockService clock)Create a new homebase.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeliverOre(int amount)Retrieve some ore amount.longgetMissiontime()Getter for missiontime.longgetMissionTime()Get the mission time.intgetOre()Get the amount of ore.longgetRemainingMissionTime()Get the remaining mission time.longgetStarttime()Getter for starttimevoidsetMissiontime(long missiontime)Setter for missiontime.voidsetOre(int ore)Setter for ore.voidsetStarttime(long starttime)Setter for starttime.java.lang.StringtoString()Convert the Location to a string representation.- 
Methods inherited from class jadex.bdi.examples.marsworld_classic.LocationObjectequals, getId, getLocation, hashCode, setId, setLocation
 
- 
 
- 
- 
- 
Field Detail- 
oreprotected int ore The currently collected ore amount.
 - 
missiontimeprotected long missiontime The mission time.
 - 
starttimeprotected long starttime The start time.
 - 
clockprotected IClockService clock The clock.
 
- 
 - 
Constructor Detail- 
Homebasepublic Homebase(Location loc, long missiontime, IClockService clock) Create a new homebase.
 
- 
 - 
Method Detail- 
deliverOrepublic void deliverOre(int amount) Retrieve some ore amount.- Parameters:
- amount- The amount.
 
 - 
getOrepublic int getOre() Get the amount of ore.- Returns:
- The amount of Ore
 
 - 
getMissionTimepublic long getMissionTime() Get the mission time.
 - 
getRemainingMissionTimepublic long getRemainingMissionTime() Get the remaining mission time.
 - 
getMissiontimepublic long getMissiontime() Getter for missiontime.- Returns:
- Returns missiontime.
 
 - 
setMissiontimepublic void setMissiontime(long missiontime) Setter for missiontime.- Parameters:
- missiontime- The Homebase.java value to set
 
 - 
getStarttimepublic long getStarttime() Getter for starttime- Returns:
- Returns starttime.
 
 - 
setStarttimepublic void setStarttime(long starttime) Setter for starttime.- Parameters:
- starttime- The Homebase.java value to set
 
 - 
setOrepublic void setOre(int ore) Setter for ore.- Parameters:
- ore- The Homebase.java value to set
 
 - 
toStringpublic java.lang.String toString() Convert the Location to a string representation.- Overrides:
- toStringin class- LocationObject
- Returns:
- The string representation.
 
 
- 
 
-