gsim.core.objects
Interface AgentInstanceIF

All Superinterfaces:
ObjectInstanceIF, java.io.Serializable

public interface AgentInstanceIF
extends ObjectInstanceIF

The AgentInstanceIF class represents an agent instance.

Author:
Stephan

Method Summary
 void addOrSetObject(java.lang.String list, ObjectInstanceIF object)
          Adds (if not yet existing) or updates object instances in a list.
 ObjectInstanceIF createObjectFromListType(java.lang.String objectName, java.lang.String listName)
          Creates object of the type of object specified for the list and adds it to the list.
 BehaviourIF getBehaviour()
          Gets the behaviour associated with this agent instance.
 ObjectInstanceIF getObject(java.lang.String list, java.lang.String objectName)
          Gets an object from a list.
 java.lang.String[] getObjectListNames()
          Gets the object list names defined for this agent.
 ObjectInstanceIF[] getObjects(java.lang.String list)
          Gets all objects in a particular list.
 void removeAllObjects(java.lang.String list)
          Removes all objects from an object list.
 void removeObject(java.lang.String list, ObjectInstanceIF object)
          Removes an object from the specified list.
 void removeObject(java.lang.String list, java.lang.String objectName)
          Removes an object, given by its name, from the specified list.
 void setBehaviour(BehaviourIF behaviour)
          Sets the behaviour of this agent.
 
Methods inherited from interface gsim.core.objects.ObjectInstanceIF
copy, destroy, getAttribute, getAttribute, getAttributeListNames, getAttributes, getIntervalAttributeFrom, getIntervalAttributeTo, getName, getNumericalAttribute, getSetAttributeValues, getStringAttribute, inheritsFrom, resolveName, setAttribute, setIntervalAttributeValue, setNumericalAttributeValue, setSetAttributeValues, setStringAttributeValue, toUnit
 

Method Detail

addOrSetObject

void addOrSetObject(java.lang.String list,
                    ObjectInstanceIF object)
                    throws GSimObjectException
Adds (if not yet existing) or updates object instances in a list.

Parameters:
list - the name of the list
object - the object
Throws:
GSimObjectException

createObjectFromListType

ObjectInstanceIF createObjectFromListType(java.lang.String objectName,
                                          java.lang.String listName)
                                          throws GSimObjectException
Creates object of the type of object specified for the list and adds it to the list.

Parameters:
objectName - the name of the object to instanciate
listName - the name of the list
Returns:
the newly created object
Throws:
GSimObjectException

getBehaviour

BehaviourIF getBehaviour()
                         throws GSimObjectException
Gets the behaviour associated with this agent instance.

Returns:
the behaviour
Throws:
GSimObjectException

getObject

ObjectInstanceIF getObject(java.lang.String list,
                           java.lang.String objectName)
                           throws GSimObjectException
Gets an object from a list.

Parameters:
list - the list name
objectName - the object name
Returns:
the object
Throws:
GSimObjectException

getObjectListNames

java.lang.String[] getObjectListNames()
                                      throws GSimObjectException
Gets the object list names defined for this agent.

Returns:
the names of the lists
Throws:
GSimObjectException

getObjects

ObjectInstanceIF[] getObjects(java.lang.String list)
                              throws GSimObjectException
Gets all objects in a particular list.

Parameters:
list - the name of the list
Returns:
list of objects
Throws:
GSimObjectException

removeAllObjects

void removeAllObjects(java.lang.String list)
                      throws GSimObjectException
Removes all objects from an object list.

Parameters:
list -
Throws:
GSimObjectException

removeObject

void removeObject(java.lang.String list,
                  ObjectInstanceIF object)
                  throws GSimObjectException
Removes an object from the specified list.

Parameters:
list - the name of the list
object - the object
Throws:
GSimObjectException

removeObject

void removeObject(java.lang.String list,
                  java.lang.String objectName)
                  throws GSimObjectException
Removes an object, given by its name, from the specified list.

Parameters:
list - the name of the list
objectName - the name of the object
Throws:
GSimObjectException

setBehaviour

void setBehaviour(BehaviourIF behaviour)
                  throws GSimObjectException
Sets the behaviour of this agent.

Parameters:
behaviour - the behaviour
Throws:
GSimObjectException