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).


Constructor Index

 o ShortcutCollection()
 o ShortcutCollection(Collection)

Method Index

 o conceal(Symbol)
 o concealable(boolean)
 o contains(Symbol)
 o count()
 o deallocate()
 o elements()
 o ensureTrie()
 o get(Object)
Returns the atom matched, or, possibly, an instance of a Trie object that contains all the matching atoms.
 o getElementAt(int)
 o getExact(String)
 o getTrieFor(String)
 o link(Symbol)
Add this object to the list of objects
 o linkToSecondary(LinkedList)
 o linkToSecondary(Symbol)
 o loadFrom(DataInput)
 o modified()
 o 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.
 o removeElementAt(int)
aha!, but I reserve the right to make this function more efficient this way ;p~ (ie, it isn't very, atm)
 o resetModify()
 o reveal(Symbol)
 o sort()
Sorts the elements in this linked trie
 o unlink(Symbol)
Take this player out of the list of players
 o unlinkFromSecondary(Symbol)
 o writeTo(DataOutput)

Constructors

 o ShortcutCollection
 public ShortcutCollection()
 o ShortcutCollection
 public ShortcutCollection(Collection c)

Methods

 o 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
 o conceal
 public synchronized void conceal(Symbol a)
 o reveal
 public synchronized void reveal(Symbol a)
 o concealable
 public void concealable(boolean t)
 o linkToSecondary
 protected synchronized void linkToSecondary(Symbol a) throws NonUniqueKeyException, BadKeyException
 o unlinkFromSecondary
 protected synchronized void unlinkFromSecondary(Symbol a) throws NonUniqueKeyException, BadKeyException
 o 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.

 o 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
 o contains
 public boolean contains(Symbol o)
 o ensureTrie
 public synchronized void ensureTrie()
 o sort
 public synchronized void sort()
Sorts the elements in this linked trie

 o linkToSecondary
 protected synchronized void linkToSecondary(LinkedList ll)
 o 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
 o getTrieFor
 public Object getTrieFor(String match)
 o getExact
 public Symbol getExact(String match)
 o getElementAt
 public Symbol getElementAt(int c)
 o 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)

 o elements
 public Enumeration elements()
 o count
 public int count()
 o writeTo
 public synchronized void writeTo(DataOutput to) throws IOException
 o loadFrom
 public synchronized void loadFrom(DataInput from) throws IOException
 o deallocate
 public synchronized void deallocate()
 o modified
 public boolean modified()
 o resetModify
 public void resetModify()

All Packages  Class Hierarchy  This Package  Previous  Next  Index