All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Abstract.AddressTable

Abstract.AddressTable

public abstract class AddressTable
Abstract AddressTable class for store and retain Address. The static addresses can be stored to the AddressTable from file reading and dynamic addresses can be stored by addAddress method. You can extend this class to use 'description' field of Address more structured way. The key field is the agent name and the value field is address object.


Constructor Index

 o AddressTable()
Default constructor

Method Index

 o addAddress(Address)
Same agent id address will be replaced with new one.
 o getAddress(String)
Get an Address object using agent name
 o getAddressTableWithType(String)
Get an AddressTable of the same Type address
 o removeAddress(String)
Remove an address from the table

Constructors

 o AddressTable
 public AddressTable()
Default constructor

Methods

 o addAddress
 public abstract void addAddress(Address addr)
Same agent id address will be replaced with new one. Assume that agent address can be dynamically changed.

Parameters:
addr - : Address object for the agent
Returns:
None
 o removeAddress
 public abstract void removeAddress(String id)
Remove an address from the table

Parameters:
id - agent name
 o getAddress
 public abstract Address getAddress(String id)
Get an Address object using agent name

Parameters:
id - Agent name
Returns:
Address object, the agent has. Null if the address is not defined
 o getAddressTableWithType
 public abstract AddressTable getAddressTableWithType(String type)
Get an AddressTable of the same Type address

Parameters:
type - Type definition(e.g. class name) to retrieve
Returns:
AddressTable

All Packages  Class Hierarchy  This Package  Previous  Next  Index