|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.agentfactory.cldc.AgentName
public class AgentName
This class represents the name of an agent. It provides support for the name to be updated to a unqiue value and for checking whether the name matches a wild card representation.
| Field Summary | |
|---|---|
static char |
DELIM
|
| Constructor Summary | |
|---|---|
AgentName(FOS nm,
java.lang.String appVal,
Platform plat)
Creates a new instance of AgentName |
|
AgentName(java.lang.String s,
java.lang.String a)
Creates a new instance of AgentName |
|
| Method Summary | |
|---|---|
void |
addName(java.lang.String[] array,
int i)
Adds a string represenation of the name to the array at the specified index. |
void |
addToTable(java.util.Hashtable table,
AgentRunnable agent)
Adds the AgentRunnable to the hash table using the functor of the first order structure representation of the agent name as the key. |
void |
appendName(java.lang.StringBuffer buffer)
Appends the name to the specified string buffer. |
boolean |
equals(java.lang.Object o)
|
java.lang.Object |
getFromTable(java.util.Hashtable table)
Obtains an object from the hash table using the functor of the first order structure representation of the agent name as the key. |
int |
hashCode()
The hash code of the name. |
boolean |
isUnique()
Tests whether this is a unique name. |
boolean |
isWild()
Tests whether this name contains the wild card symbol *. |
void |
update(FOS fos)
Updates the name with a unique value. |
boolean |
wildEquals(AgentName an)
Checks whether this agent name matches the specified agent name that contains a wild card. |
void |
write(java.io.DataOutputStream out)
Writes the name to a data output stream. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final char DELIM
| Constructor Detail |
|---|
public AgentName(FOS nm,
java.lang.String appVal,
Platform plat)
nm - a first order structure representation of the agent name.appVal - the application name.plat - the platform the agent is operating on.
public AgentName(java.lang.String s,
java.lang.String a)
s - A string representation of the agent name.a - the application name.| Method Detail |
|---|
public boolean isUnique()
public void addName(java.lang.String[] array,
int i)
array - the array the name is to be added to.i - the index at which the name should be added.public int hashCode()
hashCode in class java.lang.Object
public void addToTable(java.util.Hashtable table,
AgentRunnable agent)
table - the table the name is to be added.agent - the AgentRunnable that is to be added.public java.lang.Object getFromTable(java.util.Hashtable table)
table - the table the object is to be obtained from.
public void write(java.io.DataOutputStream out)
throws java.io.IOException
out - the stream to write the name to.
java.io.IOException - if there is an I/O error.public void appendName(java.lang.StringBuffer buffer)
buffer - the string buffer the name is to be appended.public boolean isWild()
public boolean wildEquals(AgentName an)
an - the wild card name that this name is being compared to.
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic void update(FOS fos)
fos - a first order structure representation of the unique value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||