|
Jadex 0.96 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjadex.examples.cleanerworld.multi.Environment
public class Environment
The environment object for non distributed applications.
Field Summary | |
---|---|
SimplePropertyChangeSupport |
pcs
The helper object for bean events. |
Constructor Summary | |
---|---|
Environment()
Create a new environment. |
Method Summary | |
---|---|
void |
addChargingStation(Chargingstation station)
Add a charging station. |
void |
addCleaner(Cleaner cleaner)
Add a cleaner. |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list. |
void |
addWaste(Waste waste)
Add a piece of waste. |
void |
addWastebin(Wastebin wastebin)
Add a wastebin. |
void |
clear()
Clear the environment. |
boolean |
dropWasteInWastebin(Waste waste,
Wastebin wastebin)
Drop a piece of waste. |
int |
getAge(Cleaner cleaner)
Get the age of a cleaner. |
Chargingstation[] |
getChargingstations()
Get all charging stations. |
Cleaner[] |
getCleaners()
Get all cleaners. |
Vision |
getCompleteVision()
Get the complete vision. |
boolean |
getDaytime()
Get the daytime. |
static Environment |
getInstance()
Get the singleton. |
Vision |
getVision(Cleaner cleaner)
Get the current vision. |
Wastebin |
getWastebin(String name)
Get a wastebin for a name. |
Wastebin[] |
getWastebins()
Get all wastebins. |
Waste[] |
getWastes()
Get all wastes. |
boolean |
pickUpWaste(Waste waste)
Try to pick up some piece of waste. |
void |
removeCleaner(Cleaner cleaner)
Remove a cleaner. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. |
void |
removeWaste(Waste waste)
Remove a piece of waste. |
void |
setDaytime(boolean daytime)
Set the daytime. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public SimplePropertyChangeSupport pcs
Constructor Detail |
---|
public Environment()
Method Detail |
---|
public static Environment getInstance()
public Vision getVision(Cleaner cleaner)
getVision
in interface IEnvironment
cleaner
- The cleaner.
public boolean pickUpWaste(Waste waste)
pickUpWaste
in interface IEnvironment
waste
- The waste.
public boolean dropWasteInWastebin(Waste waste, Wastebin wastebin)
dropWasteInWastebin
in interface IEnvironment
waste
- The piece of waste.wastebin
- The waste bin.public Vision getCompleteVision()
public boolean getDaytime()
public void setDaytime(boolean daytime)
daytime
- The daytime.public void addCleaner(Cleaner cleaner)
cleaner
- The cleaner.public void removeCleaner(Cleaner cleaner)
cleaner
- The cleaner.public void addWaste(Waste waste)
waste
- The new piece of waste.public void removeWaste(Waste waste)
waste
- The piece of waste.public void addWastebin(Wastebin wastebin)
wastebin
- The new waste bin.public void addChargingStation(Chargingstation station)
station
- The new charging station.public Waste[] getWastes()
public Wastebin[] getWastebins()
public Chargingstation[] getChargingstations()
public Cleaner[] getCleaners()
public Wastebin getWastebin(String name)
public void clear()
public int getAge(Cleaner cleaner)
public void addPropertyChangeListener(PropertyChangeListener listener)
listener
- The PropertyChangeListener to be added.public void removePropertyChangeListener(PropertyChangeListener listener)
listener
- The PropertyChangeListener to be removed.
|
Jadex 0.96 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.