Class WarehouseUpdate

java.lang.Object
it.polimi.ingsw.model.updatecontainers.WarehouseUpdate
All Implemented Interfaces:
ModelUpdate

public class WarehouseUpdate
extends java.lang.Object
implements ModelUpdate
A model update represents an update happened in a warehouse. Model updates contain information to notify clients or views of an update happened on the model
  • Constructor Summary

    Constructors
    Constructor Description
    WarehouseUpdate​(ResourceType resourceType, int quantity, int level)  
  • Method Summary

    Modifier and Type Method Description
    int getLevel()
    returns the level in which the change occurred
    int getQuantity()
    returns the new quantity of the changed resource
    ResourceType getResourceType()
    returns the resource that has been changed

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WarehouseUpdate

      public WarehouseUpdate​(ResourceType resourceType, int quantity, int level)
  • Method Details

    • getResourceType

      public ResourceType getResourceType()
      returns the resource that has been changed
      Returns:
      the resource that has been changed
    • getQuantity

      public int getQuantity()
      returns the new quantity of the changed resource
      Returns:
      the new quantity of the changed resource
    • getLevel

      public int getLevel()
      returns the level in which the change occurred
      Returns:
      the level in which the change occurred