import java.lang.Integer; import java.lang.Boolean; /** *
* ILogicVarBundle is the interface for * the discrete component of robotic agent state. * This is the component of DiscreteAgentState that gets fed back * into the agent for the next round of *
* @author Michael Schuresko * @version %I%, %G% * @since 1.0 */ public interface ILogicVarBundle { /** * makes a copy and returns it */ public ILogicVarBundle makeCopy(); /** * Some agent states need initialization other than just "copy me" * This function handles that. */ public void init(); /** * gets an Integer (wrapping an int) referred to by an object. * returns null if refObject is of invalid type * or indexes an invalid logic var. * * Note: The original specification only allowed boolean * variables in this place. Obviously some applications may * want to use collections of boolean variables to represent * integers over a finite fixed range, or rationals with * finite fixed precision over a finite fixed range. * This function is merely provided as a shortcut towards this end. */ public Integer getIntVar(Object refObject); /** * inserts an integer value (see getIntvar). Returns fals * if this insert was not permitted * @see ILogicVarBundle#getIntVar */ public boolean insertIntVar(Object refObject, int nValue); /** * gets a Boolean (wrapping a boolean) referred to by an object. * returns null if refObject is of invalid type * or indexes an invalid logic var. */ public Boolean getBoolVar(Object refObject); /** * inserts an boolean value (see getBoolVar). Returns fals * if this insert was not permitted * @see ILogicVarBundle#getBoolVar */ public boolean insertBoolVar(Object refObject, boolean bValue); /** * Removes any values indexed by refObject * @param refObject remove values associated with this. */ public void removeVar(Object refObject); /** * Gets unique Id of this agent */ public int getId(); /** * Sets unique Id of this agent */ public void setId(int nId); }