lime
Class AgentID
java.lang.Object
|
+--lime.AgentID
- All Implemented Interfaces:
- java.io.Serializable
- public class AgentID
- extends java.lang.Object
- implements java.io.Serializable
Defines the identifier of an agent, i.e., of an ILimeAgent
object. The (globally unique) identifier is generated when the agent is
instantiated and will remain the same when the agent migrates.
- Version:
- 1.0 alpha
- Author:
- Amy L. Murphy, Gian Pietro Picco
- See Also:
- Serialized Form
Constructor Summary |
AgentID(LimeServerID creationHost,
long n)
Construct a new agent identifier. |
Method Summary |
boolean |
equals(java.lang.Object id)
Tests two agent identifiers for equality. |
int |
hashCode()
|
java.lang.String |
toString()
Returns a concise textual description for this object. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
AgentID
public AgentID(LimeServerID creationHost,
long n)
- Construct a new agent identifier. This constructor may disappear in the
future.
- Parameters:
creationHost
- the host where the agent has been created.n
- the numeric identifier.
equals
public boolean equals(java.lang.Object id)
- Tests two agent identifiers for equality.
- Overrides:
equals
in class java.lang.Object
- Parameters:
id
- the agent id to be compared with.- Returns:
true
if the two identifiers are the same,
false
otherwise.
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Returns a concise textual description for this object.
- Overrides:
toString
in class java.lang.Object