|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmadkit.kernel.Probe
madkit.simulation.probes.ReflexiveProbe
public class ReflexiveProbe
This class implements a dynamic probe on a given property.
Field Summary | |
---|---|
protected java.util.Map |
fields
|
Constructor Summary | |
---|---|
ReflexiveProbe(java.lang.String group,
java.lang.String role,
java.lang.String property)
|
|
ReflexiveProbe(java.lang.String community,
java.lang.String group,
java.lang.String role,
java.lang.String property)
|
Method Summary | |
---|---|
void |
findFields()
|
AbstractAgent |
getAgentNb(int nb)
|
java.util.ListIterator |
getAgentsIterator()
return a ListIterator orver the agents that handle the group/role couple |
boolean |
getBoolean(java.lang.Object theAgent)
|
char |
getChar(java.lang.Object theAgent)
|
java.lang.String |
getCommunity()
|
java.util.List |
getCurrentAgentsList()
return a list view (a snapshot at moment t) of the agents that handle the group/role couple (in proper sequence) |
double |
getDouble(java.lang.Object theAgent)
|
java.lang.String |
getGroup()
|
long |
getLong(java.lang.Object theAgent)
|
java.lang.Object |
getObject(java.lang.Object theAgent)
|
java.lang.String |
getProperty()
|
int |
getPropertyCount()
|
java.lang.String |
getRole()
|
java.util.ListIterator |
getShuffledAgentsIterator()
return a ListIterator that has been previously shuffled |
void |
initialize()
this method is automatically invoked the first time the agents variable is updated so it's a good place to initialize activator's parameters like in the SingleMethodActivator for exemple |
int |
numberOfAgents()
return the number of the agents that handle the group/role couple |
java.lang.String |
toString()
|
void |
update(AbstractAgent theAgent,
boolean added)
this method is automatically invoked when changes occur on the considered group/role couple |
void |
updateFieldFor(java.lang.Object theAgent)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.Map fields
Constructor Detail |
---|
public ReflexiveProbe(java.lang.String group, java.lang.String role, java.lang.String property)
public ReflexiveProbe(java.lang.String community, java.lang.String group, java.lang.String role, java.lang.String property)
Method Detail |
---|
public java.lang.String getProperty()
public void findFields()
public void initialize()
Probe
initialize
in class Probe
public void update(AbstractAgent theAgent, boolean added)
Probe
update
in class Probe
theAgent
- is the agent which have been added or removed from the agents collection (a List)added
- is true is theAgent has been added to the agents, false if removed from itpublic void updateFieldFor(java.lang.Object theAgent)
public double getDouble(java.lang.Object theAgent)
public long getLong(java.lang.Object theAgent)
public boolean getBoolean(java.lang.Object theAgent)
public char getChar(java.lang.Object theAgent)
public java.lang.Object getObject(java.lang.Object theAgent)
public int getPropertyCount()
public final java.util.ListIterator getAgentsIterator()
public final java.util.ListIterator getShuffledAgentsIterator()
public final java.util.List getCurrentAgentsList()
public final int numberOfAgents()
public final AbstractAgent getAgentNb(int nb)
public final java.lang.String getCommunity()
public final java.lang.String getGroup()
public final java.lang.String getRole()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |