Commit 305d469f authored by afreyssin's avatar afreyssin

Adds a method allowing to know if an agent is local or not.

parent 1724b114
......@@ -447,14 +447,19 @@ public final class AgentId implements Serializable, Encodable {
}
/**
*
* @return <code>true</code> if this id is equals to NullId;
* <code>false</code> otherwise.
* @return <code>true</code> if this id is equals to NullId; <code>false</code> otherwise.
*/
public final boolean isNullId() {
return (stamp == NullIdStamp);
}
/**
* @return <code>true</code> if this the 2 agents are colocated; <code>false</code> otherwise.
*/
public final boolean isLocal() {
return (to == AgentServer.getServerId());
}
/**
* Indicates whether some other agent id. is "equal to" this one. This method
* returns <code>true</code> if and only if obj is an <code>AgentId</code>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment