|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--util.TranslatorEngine
A basic Translator engine to be used in translator agent
TranslatorAgent
, Serialized FormField Summary | |
protected Map |
names
this map maps name ==> thing(s) |
protected Hashtable |
things
this hashtable maps thing ==> name(s) |
Constructor Summary | |
TranslatorEngine(Map names)
|
Method Summary | |
boolean |
addName(Serializable thing,
Serializable name)
Allows you to add a name to a thing |
boolean |
addNames(Serializable thing,
Collection names)
A convenience method -- allows you to add several names at once |
boolean |
forgetAll()
Tells the resolver to forget all of the name-thing bindings |
Collection |
getAllNames()
Returns all names of all things registered with this agent |
Collection |
getAllNames(Serializable thing)
Finds all names for the thing. |
Collection |
getAllNamesForThings(Collection things)
Get all the names for all the things passed in as the argument |
Collection |
getAllThings()
Returns all things registered with this agent |
protected Hashtable |
getNameSet(Collection stuff)
Given a collection of stuff, this method will return a Hashtable that has things from the collection set as keys (with any non-null values) |
Serializable |
getUniqueName(Serializable thing)
Get the unique name for the thing in the scope of this agent (all other things registered with this agent will be considered. |
Serializable |
getUniqueName(Serializable thing,
Collection context)
Find a unique name that distinguishes thing from stuff passed in the collection |
protected Serializable |
getUniqueName(Serializable thing,
Map context)
The method that really does the job of finding a unique name |
boolean |
removeName(Serializable thing,
Serializable name)
Remove a name from the list of names for the thing |
boolean |
removeThing(Serializable thing)
Remove all names for the thing |
Collection |
resolveName(Serializable name)
Returns all things associated with the name |
protected void |
setUpLookup()
Set up all data structures for reverse lookups, etc. |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Map names
protected Hashtable things
Constructor Detail |
public TranslatorEngine(Map names)
Method Detail |
protected void setUpLookup()
public boolean addName(Serializable thing, Serializable name)
public boolean addNames(Serializable thing, Collection names)
public boolean removeName(Serializable thing, Serializable name)
public Serializable getUniqueName(Serializable thing)
public Serializable getUniqueName(Serializable thing, Collection context)
protected Serializable getUniqueName(Serializable thing, Map context)
protected Hashtable getNameSet(Collection stuff)
public Collection getAllNames(Serializable thing)
public Collection getAllNamesForThings(Collection things)
public boolean removeThing(Serializable thing)
public Collection resolveName(Serializable name)
public boolean forgetAll()
public Collection getAllNames()
public Collection getAllThings()
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |