Class SimpleFlockingAgent.SimpFlockState

java.lang.Object
  extended by SimpleFlockingAgent.SimpFlockState
All Implemented Interfaces:
ILogicVarBundle
Enclosing class:
SimpleFlockingAgent

public static class SimpleFlockingAgent.SimpFlockState
extends java.lang.Object
implements ILogicVarBundle

inner class used for flocking state


Constructor Summary
SimpleFlockingAgent.SimpFlockState()
           
SimpleFlockingAgent.SimpFlockState(double lfHeading)
           
SimpleFlockingAgent.SimpFlockState(SimpleFlockingAgent.SimpFlockState src)
           
 
Method Summary
 java.lang.Boolean getBoolVar(java.lang.Object refObject)
          gets a Boolean (wrapping a boolean) referred to by an object.
 double getHeading()
           
 double getHeadingDelta(double lfHead, double lfRate)
           
 int getId()
          Gets unique Id of this agent
 java.lang.Integer getIntVar(java.lang.Object refObject)
          gets an Integer (wrapping an int) referred to by an object.
 boolean insertBoolVar(java.lang.Object refObject, boolean bValue)
          inserts an boolean value (see getBoolVar).
 boolean insertIntVar(java.lang.Object refObject, int nValue)
          inserts an integer value (see getIntvar).
 SimpleFlockingAgent.SimpFlockState makeCopy()
          makes a copy and returns it
 void removeVar(java.lang.Object refObject)
          Removes any values indexed by refObject
 void setHeading(double lfHeading)
           
 void setId(int nId)
          Sets unique Id of this agent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleFlockingAgent.SimpFlockState

public SimpleFlockingAgent.SimpFlockState()

SimpleFlockingAgent.SimpFlockState

public SimpleFlockingAgent.SimpFlockState(double lfHeading)

SimpleFlockingAgent.SimpFlockState

public SimpleFlockingAgent.SimpFlockState(SimpleFlockingAgent.SimpFlockState src)
Method Detail

makeCopy

public SimpleFlockingAgent.SimpFlockState makeCopy()
makes a copy and returns it

Specified by:
makeCopy in interface ILogicVarBundle

getIntVar

public java.lang.Integer getIntVar(java.lang.Object refObject)
Description copied from interface: ILogicVarBundle
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.

Specified by:
getIntVar in interface ILogicVarBundle

insertIntVar

public boolean insertIntVar(java.lang.Object refObject,
                            int nValue)
Description copied from interface: ILogicVarBundle
inserts an integer value (see getIntvar). Returns fals if this insert was not permitted

Specified by:
insertIntVar in interface ILogicVarBundle
See Also:
ILogicVarBundle.getIntVar(java.lang.Object)

getBoolVar

public java.lang.Boolean getBoolVar(java.lang.Object refObject)
Description copied from interface: ILogicVarBundle
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.

Specified by:
getBoolVar in interface ILogicVarBundle

insertBoolVar

public boolean insertBoolVar(java.lang.Object refObject,
                             boolean bValue)
Description copied from interface: ILogicVarBundle
inserts an boolean value (see getBoolVar). Returns fals if this insert was not permitted

Specified by:
insertBoolVar in interface ILogicVarBundle
See Also:
ILogicVarBundle.getBoolVar(java.lang.Object)

removeVar

public void removeVar(java.lang.Object refObject)
Removes any values indexed by refObject

Specified by:
removeVar in interface ILogicVarBundle
Parameters:
refObject - remove values associated with this.

getId

public int getId()
Gets unique Id of this agent

Specified by:
getId in interface ILogicVarBundle

setId

public void setId(int nId)
Sets unique Id of this agent

Specified by:
setId in interface ILogicVarBundle

getHeading

public double getHeading()

setHeading

public void setHeading(double lfHeading)

getHeadingDelta

public double getHeadingDelta(double lfHead,
                              double lfRate)