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.
-
AddressTable()
- Default constructor
-
addAddress(Address)
- Same agent id address will be replaced with new one.
-
getAddress(String)
- Get an Address object using agent name
-
getAddressTableWithType(String)
- Get an AddressTable of the same Type address
-
removeAddress(String)
- Remove an address from the table
AddressTable
public AddressTable()
- Default constructor
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
removeAddress
public abstract void removeAddress(String id)
- Remove an address from the table
- Parameters:
- id - agent name
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
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