is.lill.acre.message
Class ACREAgentID

java.lang.Object
  extended by is.lill.acre.message.ACREAgentID
All Implemented Interfaces:
IACREAgentID

public class ACREAgentID
extends java.lang.Object
implements IACREAgentID


Constructor Summary
ACREAgentID(java.lang.String name)
           
ACREAgentID(java.lang.String name, java.util.Collection<java.lang.String> addresses)
           
ACREAgentID(java.lang.String name, java.lang.String address)
           
 
Method Summary
 boolean equals(java.lang.Object id)
          Check if this agent id is equal to a given agent id.
 java.util.List<java.lang.String> getAddresses()
           
 java.lang.String getName()
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ACREAgentID

public ACREAgentID(java.lang.String name)

ACREAgentID

public ACREAgentID(java.lang.String name,
                   java.lang.String address)

ACREAgentID

public ACREAgentID(java.lang.String name,
                   java.util.Collection<java.lang.String> addresses)
Method Detail

getAddresses

public java.util.List<java.lang.String> getAddresses()
Specified by:
getAddresses in interface IACREAgentID

getName

public java.lang.String getName()
Specified by:
getName in interface IACREAgentID

equals

public boolean equals(java.lang.Object id)
Check if this agent id is equal to a given agent id. Based on the fact that agent names should be globally unique, per FIPA standards

Overrides:
equals in class java.lang.Object
Returns:
true if the agent names are the same, false otherwise

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object