public class SensorActuator
extends java.lang.Object
Constructor and Description |
---|
SensorActuator()
Create a sensor for a new cleaner robot.
|
Modifier and Type | Method and Description |
---|---|
void |
dropWasteInWastebin(IWaste waste,
IWastebin wastebin)
Drop a piece of waste.
|
java.util.Set<IChargingstation> |
getChargingstations()
Get the known charging stations.
|
java.util.Set<ICleaner> |
getCleaners()
Get the known other cleaners.
|
ICleaner |
getSelf()
Get the knowledge about the cleaner itself.
|
ILocation |
getTarget()
Get the current movement target, if any.
|
java.util.Set<IWastebin> |
getWastebins()
Get the known waste pieces.
|
java.util.Set<IWaste> |
getWastes()
Get the known waste pieces.
|
boolean |
isDaytime()
Check, if it is at day or at night.
|
void |
manageChargingstationsIn(java.util.Set<IChargingstation> chargingstations)
Use the provided set to manage the known charging station objects.
|
void |
manageCleanersIn(java.util.Set<ICleaner> cleaners)
Use the provided set to manage the known cleaner objects.
|
void |
manageWastebinsIn(java.util.Set<IWastebin> wastebins)
Use the provided set to manage the known waste bin objects.
|
void |
manageWastesIn(java.util.Set<IWaste> wastes)
Use the provided set to manage the known waste objects.
|
void |
moveTo(double x,
double y)
Move to the given location.
|
void |
moveTo(ILocation location)
Move to the given location.
|
void |
pickUpWaste(IWaste waste)
Try to pick up some piece of waste.
|
void |
recharge(IChargingstation chargingstation,
double level)
Recharge a cleaner at a charging station to a desired charging level.
|
public ICleaner getSelf()
public boolean isDaytime()
public java.util.Set<ICleaner> getCleaners()
public java.util.Set<IWaste> getWastes()
public java.util.Set<IChargingstation> getChargingstations()
public java.util.Set<IWastebin> getWastebins()
public void manageWastesIn(java.util.Set<IWaste> wastes)
public void manageWastebinsIn(java.util.Set<IWastebin> wastebins)
public void manageChargingstationsIn(java.util.Set<IChargingstation> chargingstations)
public void manageCleanersIn(java.util.Set<ICleaner> cleaners)
public void moveTo(ILocation location)
location
- The location.public void moveTo(double x, double y)
x
- X coordinate.y
- Y coordinate.public void recharge(IChargingstation chargingstation, double level)
chargingstation
- The charging station to recharge at.level
- The desired charging level between 0 and 1.public ILocation getTarget()
public void pickUpWaste(IWaste waste)
waste
- The waste.