|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--jxtaimpl.NeighbourManager
This synchronized class is used as a repository for storing information about this nest's neighbourhood. This class has to be instantiated by the AnthillPeerWS, and a reference to the instance itself has to be passed to the Nest instance (see sequence diagrams for more)
| Constructor Summary | |
NeighbourManager()
Defaul constructor |
|
| Method Summary | |
protected void |
addNeighbour(NestId id)
A new Neighbour instance is created using the given NestId and added to the internal data structure using the NestId as key value. |
void |
clear()
This method cleans up the cache of neighbours managed by the NeighbourManager instance |
protected Object |
removeNeighbour(NestId id)
This method removes the neighbour entry associated with the specified id. |
protected int |
size()
Return the number of elements stored |
protected Neighbour[] |
toArray()
Return the values contained in this set, shaped as an array of Neighbours |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public NeighbourManager()
| Method Detail |
public void clear()
clear in interface Clearableprotected void addNeighbour(NestId id)
id - The ID to be added to the set of known neighboursprotected Object removeNeighbour(NestId id)
id - The ID of the Nest to be removed from the set of known neighboursprotected Neighbour[] toArray()
protected int size()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||