All Packages Class Hierarchy This Package Previous Next Index
Class key.ShortcutCollection
java.lang.Object
|
+----key.ShortcutCollection
- public final class ShortcutCollection
- extends Object
- implements Collection, LatentlyCached
The shortcut container was created so that you could 'shortcut'
the contents of a container on the string. There are limitations
in the implementation - it uses Trie's to provide the shortcut,
so only [a-z] characters may be used. (No punctuation)
Obviously, everything in the collection must be adequately (and
uniquely named).
-
ShortcutCollection()
-
-
ShortcutCollection(Collection)
-
-
conceal(Symbol)
-
-
concealable(boolean)
-
-
contains(Symbol)
-
-
count()
-
-
deallocate()
-
-
elements()
-
-
ensureTrie()
-
-
get(Object)
- Returns the atom matched, or, possibly, an instance of
a Trie object that contains all the matching atoms.
-
getElementAt(int)
-
-
getExact(String)
-
-
getTrieFor(String)
-
-
link(Symbol)
- Add this object to the list of objects
-
linkToSecondary(LinkedList)
-
-
linkToSecondary(Symbol)
-
-
loadFrom(DataInput)
-
-
modified()
-
-
partialLink(Symbol)
- Adds this atom to the database in such a
way that it can be matched, but not seen
by iterating through the elements.
-
removeElementAt(int)
- aha!, but I reserve the right to make this function more efficient
this way ;p~ (ie, it isn't very, atm)
-
resetModify()
-
-
reveal(Symbol)
-
-
sort()
- Sorts the elements in this linked trie
-
unlink(Symbol)
- Take this player out of the list of players
-
unlinkFromSecondary(Symbol)
-
-
writeTo(DataOutput)
-
ShortcutCollection
public ShortcutCollection()
ShortcutCollection
public ShortcutCollection(Collection c)
link
public synchronized void link(Symbol a) throws NonUniqueKeyException, BadKeyException
- Add this object to the list of objects
- Parameters:
- p - the player to add to the list
- Throws: NonUniqueKeyException
- if there is already a player in with this name
- Throws: BadKeyException
- if this players name is malformed somehow
conceal
public synchronized void conceal(Symbol a)
reveal
public synchronized void reveal(Symbol a)
concealable
public void concealable(boolean t)
linkToSecondary
protected synchronized void linkToSecondary(Symbol a) throws NonUniqueKeyException, BadKeyException
unlinkFromSecondary
protected synchronized void unlinkFromSecondary(Symbol a) throws NonUniqueKeyException, BadKeyException
partialLink
public synchronized void partialLink(Symbol a) throws NonUniqueKeyException, BadKeyException
- Adds this atom to the database in such a
way that it can be matched, but not seen
by iterating through the elements.
unlink
public synchronized void unlink(Symbol a) throws NoSuchElementException, BadKeyException
- Take this player out of the list of players
- Parameters:
- p - the player to remove from the list
- Throws: NoSuchElementException
- if the player is not in the list
- Throws: BadKeyException
- if the players name is malformed somehow
contains
public boolean contains(Symbol o)
ensureTrie
public synchronized void ensureTrie()
sort
public synchronized void sort()
- Sorts the elements in this linked trie
linkToSecondary
protected synchronized void linkToSecondary(LinkedList ll)
get
public Object get(Object key)
- Returns the atom matched, or, possibly, an instance of
a Trie object that contains all the matching atoms.
A null is returned if no matches were found at all. The
match string is searched until the end of the string or
a non-alphabetical character is found.
- Parameters:
- match - the start or whole string to match from
- Returns:
- An atom object, referring to the sole match, or a Trie
getTrieFor
public Object getTrieFor(String match)
getExact
public Symbol getExact(String match)
getElementAt
public Symbol getElementAt(int c)
removeElementAt
public synchronized void removeElementAt(int c) throws NonUniqueKeyException, NoSuchElementException, BadKeyException
- aha!, but I reserve the right to make this function more efficient
this way ;p~ (ie, it isn't very, atm)
elements
public Enumeration elements()
count
public int count()
writeTo
public synchronized void writeTo(DataOutput to) throws IOException
loadFrom
public synchronized void loadFrom(DataInput from) throws IOException
deallocate
public synchronized void deallocate()
modified
public boolean modified()
resetModify
public void resetModify()
All Packages Class Hierarchy This Package Previous Next Index