|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--anthill.Neighbour
Class Neighbour
contains the information related
to another nest related to another nest. The information
stored in Neighbour
objects include the identifier
of the neighbour nest, the communication cost and the reachability
status.
Constructor Summary | |
Neighbour(NestId id)
Constructs a new neighbour with the given identifier. |
|
Neighbour(NestId id,
float cost,
boolean reachable)
Constructs a new neighbour with the given identifier and with the specified additional parameters. |
Method Summary | |
boolean |
equals(Object obj)
Check whether this LocalNid is equal to the specified object. |
float |
getCost()
Returns a float value representing the cost of communication with this neighbor. |
NestId |
getNestId()
Returns the nest identifier of the neighbour |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
isReachable()
Returns true if this neghbour is considered reachable. |
String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Neighbour(NestId id)
id
- identifier of the neighbour nestpublic Neighbour(NestId id, float cost, boolean reachable)
id
- identifier of the neighbour nestcost
- the cost of the connectionreachable
- true if the neighbor nest is reachableMethod Detail |
public NestId getNestId()
public float getCost()
public boolean isReachable()
public boolean equals(Object obj)
LocalNid
is equal to the specified object.
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |