|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmadkit.kernel.Probe<A>
madkit.simulation.probes.PropertyProbe<A,P>
public class PropertyProbe<A extends AbstractAgent,P>
This probe inspects properties of type P on Referenceable agents of type A.
| Constructor Summary | |
|---|---|
PropertyProbe(java.lang.String group,
java.lang.String role,
java.lang.String property)
|
|
PropertyProbe(java.lang.String community,
java.lang.String group,
java.lang.String role,
java.lang.String property)
|
|
| Method Summary | |
|---|---|
A |
getAgentNb(int nb)
|
java.util.ListIterator<A> |
getAgentsIterator()
Deprecated. as of MadKit 4.3 : simply type getCurrentAgentsList().listIterator() |
java.util.Collection<P> |
getAllProperties()
|
java.lang.String |
getCommunity()
|
java.util.List<A> |
getCurrentAgentsList()
|
java.lang.String |
getGroup()
|
java.util.Map<A,P> |
getMapping()
|
P |
getPropertyOf(A theAgent)
|
java.lang.String |
getRole()
|
java.util.List<A> |
getShuffledList()
|
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 example |
int |
numberOfAgents()
|
java.lang.String |
toString()
|
void |
update(AbstractAgent theAgent,
boolean added)
this method is automatically invoked when changes occur on the considered group/role couple |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PropertyProbe(java.lang.String group,
java.lang.String role,
java.lang.String property)
public PropertyProbe(java.lang.String community,
java.lang.String group,
java.lang.String role,
java.lang.String property)
| Method Detail |
|---|
public void initialize()
Probe
initialize in class Probe<A extends AbstractAgent>
public void update(AbstractAgent theAgent,
boolean added)
Probe
update in class Probe<A extends AbstractAgent>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 java.util.Map<A,P> getMapping()
public P getPropertyOf(A theAgent)
public java.util.Collection<P> getAllProperties()
public final java.util.ListIterator<A> getAgentsIterator()
getCurrentAgentsList().listIterator()
public final java.util.List<A> getShuffledList()
public final java.util.List<A> getCurrentAgentsList()
public final int numberOfAgents()
public final A 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 | |||||||||