Class Wastebin
- java.lang.Object
- 
- jadex.bdiv3.examples.cleanerworld.world.LocationObject
- 
- jadex.bdiv3.examples.cleanerworld.world.Wastebin
 
 
- 
- All Implemented Interfaces:
- java.lang.Cloneable
 
 public class Wastebin extends LocationObject Editable Java class for concept Wastebin of cleaner-generated ontology.
- 
- 
Field SummaryFields Modifier and Type Field Description protected intcapacityAttribute for slot capacity.protected static intinstancecntThe instance counter.protected java.lang.StringnameAttribute for slot name.protected java.util.ListwastesAttribute for slot wastes.- 
Fields inherited from class jadex.bdiv3.examples.cleanerworld.world.LocationObjectid, location, pcs
 
- 
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddWaste(Waste waste)Add a waste to this Wastebin.java.lang.Objectclone()Clone the object.booleancontains(Waste waste)Test is the waste is in the waste bin.voidempty()Empty the waste bin.voidfill()Fill the waste bin.intgetCapacity()Get the capacity of this Wastebin.java.lang.StringgetName()Get the name of this Wastebin.protected static intgetNumber()Get an instance number.WastegetWaste(int idx)Get an wastes of this Wastebin.Waste[]getWastes()Get the wastes of this Wastebin.booleanisFull()Test is the wastebin is full.booleanremoveWaste(Waste waste)Remove a waste from this Wastebin.voidsetCapacity(int capacity)Set the capacity of this Wastebin.voidsetName(java.lang.String name)Set the name of this Wastebin.voidsetWaste(int idx, Waste waste)Set a waste to this Wastebin.voidsetWastes(Waste[] wastes)Set the wastes of this Wastebin.java.lang.StringtoString()Get a string representation of this Wastebin.voidupdate(Wastebin wb)Update this wastebin.- 
Methods inherited from class jadex.bdiv3.examples.cleanerworld.world.LocationObjectaddPropertyChangeListener, equals, getId, getLocation, hashCode, removePropertyChangeListener, setId, setLocation
 
- 
 
- 
- 
- 
Method Detail- 
getNumberprotected static int getNumber() Get an instance number.
 - 
getWastespublic Waste[] getWastes() Get the wastes of this Wastebin.- Returns:
- wastes
 
 - 
setWastespublic void setWastes(Waste[] wastes) Set the wastes of this Wastebin.- Parameters:
- wastes- the value to be set
 
 - 
getWastepublic Waste getWaste(int idx) Get an wastes of this Wastebin.- Parameters:
- idx- The index.
- Returns:
- wastes
 
 - 
setWastepublic void setWaste(int idx, Waste waste)Set a waste to this Wastebin.- Parameters:
- idx- The index.
- waste- a value to be added
 
 - 
addWastepublic void addWaste(Waste waste) Add a waste to this Wastebin.- Parameters:
- waste- a value to be removed
 
 - 
removeWastepublic boolean removeWaste(Waste waste) Remove a waste from this Wastebin.- Parameters:
- waste- a value to be removed
- Returns:
- True when the wastes have changed.
 
 - 
getCapacitypublic int getCapacity() Get the capacity of this Wastebin.- Returns:
- capacity
 
 - 
setCapacitypublic void setCapacity(int capacity) Set the capacity of this Wastebin.- Parameters:
- capacity- the value to be set
 
 - 
getNamepublic java.lang.String getName() Get the name of this Wastebin.- Returns:
- name
 
 - 
setNamepublic void setName(java.lang.String name) Set the name of this Wastebin.- Parameters:
- name- the value to be set
 
 - 
toStringpublic java.lang.String toString() Get a string representation of this Wastebin.- Overrides:
- toStringin class- LocationObject
- Returns:
- The string representation.
 
 - 
isFullpublic boolean isFull() Test is the wastebin is full.- Returns:
- True, when wastebin is full.
 
 - 
emptypublic void empty() Empty the waste bin.
 - 
fillpublic void fill() Fill the waste bin.
 - 
containspublic boolean contains(Waste waste) Test is the waste is in the waste bin.- Returns:
- True, when wastebin contains the waste.
 
 - 
clonepublic java.lang.Object clone() Clone the object.- Overrides:
- clonein class- LocationObject
 
 - 
updatepublic void update(Wastebin wb) Update this wastebin.
 
- 
 
-