Class Inventory

java.lang.Object
edu.tufts.hrilab.polycraft.msg.Msg
edu.tufts.hrilab.polycraft.msg.Inventory

public class Inventory extends Msg
Gson can't directly populate this class because it contains a java.util.Map, so it must be populated manually after the JSON has been parsed.
  • Field Details

  • Constructor Details

    • Inventory

      public Inventory(Map<String,InventoryItem> inventory)
      Inventory constructor.
      Parameters:
      inventory - data that was parsed from JSON format
  • Method Details

    • generateAssertions

      public Set<Predicate> generateAssertions()
      Specified by:
      generateAssertions in class Msg
    • generateInventoryAssertions

      public Set<Predicate> generateInventoryAssertions()
      Generate all predicates from the inventory data.
      Returns: