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 Summary
Fields Modifier and Type Field Description protected IClockService
clock
The clock.protected long
missiontime
The mission time.protected int
ore
The currently collected ore amount.protected long
starttime
The start time.-
Fields inherited from class jadex.bdi.examples.marsworld_classic.LocationObject
id, location
-
-
Constructor Summary
Constructors Constructor Description Homebase(Location loc, long missiontime, IClockService clock)
Create a new homebase.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deliverOre(int amount)
Retrieve some ore amount.long
getMissiontime()
Getter for missiontime.long
getMissionTime()
Get the mission time.int
getOre()
Get the amount of ore.long
getRemainingMissionTime()
Get the remaining mission time.long
getStarttime()
Getter for starttimevoid
setMissiontime(long missiontime)
Setter for missiontime.void
setOre(int ore)
Setter for ore.void
setStarttime(long starttime)
Setter for starttime.java.lang.String
toString()
Convert the Location to a string representation.-
Methods inherited from class jadex.bdi.examples.marsworld_classic.LocationObject
equals, getId, getLocation, hashCode, setId, setLocation
-
-
-
-
Field Detail
-
ore
protected int ore
The currently collected ore amount.
-
missiontime
protected long missiontime
The mission time.
-
starttime
protected long starttime
The start time.
-
clock
protected IClockService clock
The clock.
-
-
Constructor Detail
-
Homebase
public Homebase(Location loc, long missiontime, IClockService clock)
Create a new homebase.
-
-
Method Detail
-
deliverOre
public void deliverOre(int amount)
Retrieve some ore amount.- Parameters:
amount
- The amount.
-
getOre
public int getOre()
Get the amount of ore.- Returns:
- The amount of Ore
-
getMissionTime
public long getMissionTime()
Get the mission time.
-
getRemainingMissionTime
public long getRemainingMissionTime()
Get the remaining mission time.
-
getMissiontime
public long getMissiontime()
Getter for missiontime.- Returns:
- Returns missiontime.
-
setMissiontime
public void setMissiontime(long missiontime)
Setter for missiontime.- Parameters:
missiontime
- The Homebase.java value to set
-
getStarttime
public long getStarttime()
Getter for starttime- Returns:
- Returns starttime.
-
setStarttime
public void setStarttime(long starttime)
Setter for starttime.- Parameters:
starttime
- The Homebase.java value to set
-
setOre
public void setOre(int ore)
Setter for ore.- Parameters:
ore
- The Homebase.java value to set
-
toString
public java.lang.String toString()
Convert the Location to a string representation.- Overrides:
toString
in classLocationObject
- Returns:
- The string representation.
-
-