decisionMakingSystem
Class Inventory

Package class diagram package Inventory
java.lang.Object
  extended by decisionMakingSystem.Inventory

public class Inventory
extends Object

Inventory cares about items agent picked up. It stores them and responds to inventory related requests.

Author:
Ondrej

Field Summary
 Bot agent
          link on the agent - to register listeners, querry built-in agent's inventory
 ArrayList<EItem> collectedEItems
          list of collected episodic items
 ArrayList<cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ItemPickedUp> collectedItems
          list of collected items
static int inventorySize
          number of items bot can hold/carry at one time
 DecisionModuleImpl module
          decision making system module
 
Constructor Summary
Inventory(Bot agent, DecisionModuleImpl module)
           
 
Method Summary
 EItem getItemOfAffordance(AffordanceType affordance)
           
 boolean hasItemOfAffordance(AffordanceType affordance)
           
 boolean hasItemOfClass(String pickedType)
          true if there is an item of specified unreal item class
 boolean isReady()
           
 void midnightUpdate()
           
 void setReady(boolean ready)
           
 void throwAway(EItem item)
          well, can just remove him from items and bot would think that he doesn't have it with himself;) but I will throw it away to have more fun:)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

collectedItems

public ArrayList<cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ItemPickedUp> collectedItems
list of collected items


collectedEItems

public ArrayList<EItem> collectedEItems
list of collected episodic items


agent

public Bot agent
link on the agent - to register listeners, querry built-in agent's inventory


module

public DecisionModuleImpl module
decision making system module


inventorySize

public static final int inventorySize
number of items bot can hold/carry at one time

See Also:
Constant Field Values
Constructor Detail

Inventory

public Inventory(Bot agent,
                 DecisionModuleImpl module)
Method Detail

midnightUpdate

public void midnightUpdate()

hasItemOfClass

public boolean hasItemOfClass(String pickedType)
true if there is an item of specified unreal item class

Parameters:
pickedType - - unreal item class
Returns:
true if there is some item of the class

hasItemOfAffordance

public boolean hasItemOfAffordance(AffordanceType affordance)
Parameters:
affordance -
Returns:
true if there is some item of the provided affordance

getItemOfAffordance

public EItem getItemOfAffordance(AffordanceType affordance)
Parameters:
affordance -
Returns:
return item of the provided affordance, null if there is not any

throwAway

public void throwAway(EItem item)
well, can just remove him from items and bot would think that he doesn't have it with himself;) but I will throw it away to have more fun:)

Parameters:
item -

isReady

public boolean isReady()
Returns:
the ready

setReady

public void setReady(boolean ready)
Parameters:
ready - the ready to set


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.