|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmadkit.kernel.AgentAddress
public class AgentAddress
This class describe the unique identifiers used in the MadKit kernel. An identifier created with this class is guaranteed to be unique. This class has been designed to be extended and subclassed in the future to handle various address type (FIPA, CORBA, MAF, JNA, ...). The syntax in this actual class is MadKit-specific.
Constructor Summary | |
---|---|
AgentAddress(AgentAddress anAddress)
Instantiates a new agent address. |
|
AgentAddress(java.lang.String def)
Attempts to define an AgentAddress from a string representation (MadKit syntax). |
|
AgentAddress(java.lang.String n,
KernelAddress k)
Define a new AgentAddress. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Compare two instances of AgentAddress. |
KernelAddress |
getKernel()
returns the address of the kernel on which the agent is currently running. |
int |
getLocalID()
The discriminating part of an AgentAddress. |
java.lang.String |
getName()
Returns current agent name. |
int |
hashCode()
|
boolean |
isLocal()
Check is this address is a local address. |
java.lang.String |
toString()
Returns a string representation of the AgentAddress (with MadKit syntax). |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AgentAddress(java.lang.String n, KernelAddress k)
n
- agent namek
- local kernel addresspublic AgentAddress(AgentAddress anAddress)
anAddress
- the addresspublic AgentAddress(java.lang.String def) throws InvalidAddressException
def
- string representation or agent name
InvalidAddressException
- if the string cannot be parsedMethod Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isLocal()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- other agent address (can be void)
public java.lang.String getName()
public int getLocalID()
public KernelAddress getKernel()
public final int hashCode()
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |