Class Warehouse

java.lang.Object
  extended byswarm.BaseImpl
      extended byswarm.objectbase.SwarmObjectImpl
          extended byWarehouse
All Implemented Interfaces:
swarm.defobj.Create, swarm.defobj.CreateS, swarm.defobj.Customize, swarm.defobj.CustomizeS, swarm.defobj.DefinedObject, swarm.defobj.DefinedObjectS, swarm.defobj.Drop, swarm.defobj.DropS, swarm.defobj.GetName, swarm.defobj.GetNameS, PTHistogramPlottable, swarm.objectbase.SwarmObject, swarm.objectbase.SwarmObjectS

public class Warehouse
extends swarm.objectbase.SwarmObjectImpl
implements PTHistogramPlottable

the Warehouset class is used to operate with inventories.

Author:
Marco Remondino and Pietro Terna

Field Summary
 int inventoryCounter
          the counter which of inventory quantity (in this versione the inventory smallest piece of inventory is 1)
 int warehouseNumber
          the number of this wharehouse
 
Constructor Summary
Warehouse(swarm.defobj.Zone aZone, int n)
          The constructor for Warehouse
 
Method Summary
 int decreaseInventoryCounterValue()
          decreasing inventories and returning the result
 boolean empty()
          checking if the warehouse is empty
 int getInventoryQuantity()
          the inventory quantity in the warehouse
 java.lang.String getLabel()
          PTHistogramPlottable interface method: getLabel()
 double getValueToPlot()
          PTHistogramPlottable interface method: getValueToPlot()
 int getWarehouseNumber()
          the number of this warehouse
 void increaseInventoryCounterValue()
          increasing inventories
 
Methods inherited from class swarm.objectbase.SwarmObjectImpl
compare, describe, describeID, drop, getCompleteProbeMap, getDisplayName, getName, getProbeForMessage, getProbeForVariable, getProbeMap, getTypeName, getZone, perform, perform$with, perform$with$with, perform$with$with$with, respondsTo, setDisplayName, xfprint, xfprintid, xprint, xprintid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

warehouseNumber

public int warehouseNumber
the number of this wharehouse


inventoryCounter

public int inventoryCounter
the counter which of inventory quantity (in this versione the inventory smallest piece of inventory is 1)

Constructor Detail

Warehouse

public Warehouse(swarm.defobj.Zone aZone,
                 int n)
The constructor for Warehouse

Method Detail

getInventoryQuantity

public int getInventoryQuantity()
the inventory quantity in the warehouse


getWarehouseNumber

public int getWarehouseNumber()
the number of this warehouse


increaseInventoryCounterValue

public void increaseInventoryCounterValue()
increasing inventories


decreaseInventoryCounterValue

public int decreaseInventoryCounterValue()
decreasing inventories and returning the result


empty

public boolean empty()
checking if the warehouse is empty


getLabel

public java.lang.String getLabel()
PTHistogramPlottable interface method: getLabel()

Specified by:
getLabel in interface PTHistogramPlottable

getValueToPlot

public double getValueToPlot()
PTHistogramPlottable interface method: getValueToPlot()

Specified by:
getValueToPlot in interface PTHistogramPlottable