|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.sc.ants.Follower.BlackList
The list of all the agents a Follower agent cannot follow. We provide several helper functions for utilizing this list.
Inner Class Summary | |
(package private) class |
Follower.BlackList.BlackListElement
A small class to hold a blacklisted agent ID and the time we added this ID to the list. |
Field Summary | |
(package private) java.util.Vector |
list
A list of blackListElement |
Constructor Summary | |
Follower.BlackList()
Constructor |
Method Summary | |
boolean |
addAgent(int id)
Adds agent to the list. |
void |
expireOld(long miliseconds)
Expire entries that are older than miliseconds. |
boolean |
isAgentIn(int id)
Tells whether agent id is in the list or not. |
boolean |
isAgentInUpdate(int id)
Tells whether agent id is in the list or not and, if it is in, updates its time to the current time. |
Methods inherited from class java.lang.Object |
|
Field Detail |
java.util.Vector list
Constructor Detail |
public Follower.BlackList()
Method Detail |
public boolean addAgent(int id)
public boolean isAgentIn(int id)
public boolean isAgentInUpdate(int id)
public void expireOld(long miliseconds)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |