Class Wastebin

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class Wastebin
    extends LocationObject
    Editable Java class for concept Wastebin of cleaner-generated ontology.
    • Field Detail

      • instancecnt

        protected static int instancecnt
        The instance counter.
      • wastes

        protected java.util.List wastes
        Attribute for slot wastes.
      • capacity

        protected int capacity
        Attribute for slot capacity.
      • name

        protected java.lang.String name
        Attribute for slot name.
    • Constructor Detail

      • Wastebin

        public Wastebin()
        Create a new Wastebin.
      • Wastebin

        public Wastebin​(Location location,
                        int capacity)
        Create a new wastebin.
      • Wastebin

        public Wastebin​(java.lang.String name,
                        Location location,
                        int capacity)
        Create a new Wastebin.
    • Method Detail

      • getNumber

        protected static int getNumber()
        Get an instance number.
      • getWastes

        public Waste[] getWastes()
        Get the wastes of this Wastebin.
        Returns:
        wastes
      • setWastes

        public void setWastes​(Waste[] wastes)
        Set the wastes of this Wastebin.
        Parameters:
        wastes - the value to be set
      • getWaste

        public Waste getWaste​(int idx)
        Get an wastes of this Wastebin.
        Parameters:
        idx - The index.
        Returns:
        wastes
      • setWaste

        public void setWaste​(int idx,
                             Waste waste)
        Set a waste to this Wastebin.
        Parameters:
        idx - The index.
        waste - a value to be added
      • addWaste

        public void addWaste​(Waste waste)
        Add a waste to this Wastebin.
        Parameters:
        waste - a value to be removed
      • removeWaste

        public boolean removeWaste​(Waste waste)
        Remove a waste from this Wastebin.
        Parameters:
        waste - a value to be removed
        Returns:
        True when the wastes have changed.
      • getCapacity

        public int getCapacity()
        Get the capacity of this Wastebin.
        Returns:
        capacity
      • setCapacity

        public void setCapacity​(int capacity)
        Set the capacity of this Wastebin.
        Parameters:
        capacity - the value to be set
      • getName

        public java.lang.String getName()
        Get the name of this Wastebin.
        Returns:
        name
      • setName

        public void setName​(java.lang.String name)
        Set the name of this Wastebin.
        Parameters:
        name - the value to be set
      • toString

        public java.lang.String toString()
        Get a string representation of this Wastebin.
        Overrides:
        toString in class LocationObject
        Returns:
        The string representation.
      • isFull

        public boolean isFull()
        Test is the wastebin is full.
        Returns:
        True, when wastebin is full.
      • empty

        public void empty()
        Empty the waste bin.
      • fill

        public void fill()
        Fill the waste bin.
      • contains

        public boolean contains​(Waste waste)
        Test is the waste is in the waste bin.
        Returns:
        True, when wastebin contains the waste.
      • clone

        public java.lang.Object clone()
        Clone the object.
        Overrides:
        clone in class LocationObject
      • update

        public void update​(Wastebin wb)
        Update this wastebin.