All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class key.AliasCollection

java.lang.Object
   |
   +----key.AliasCollection

public final class AliasCollection
extends Object
implements Collection
A special collection that requires that all its symbols use AliasListKey's as their key. WARNING: this collection should NOT be used by a reference container, as it has a nasty tendancy to change the key of everything added to it to AliasListKey's. This collections very specific purpose at the moment is for help files. (ie, "help res" and "help resident" call the same file - the lookup must be equivalent.


Constructor Index

 o AliasCollection()
 o AliasCollection(Collection)

Method Index

 o addSecondaries(AliasListKey, Symbol)
 o conceal(Symbol)
 o concealable(boolean)
 o contains(Symbol)
 o count()
 o deallocate()
 o elements()
 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 loadFrom(DataInput)
 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 removeSecondaries(AliasListKey)
 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 writeTo(DataOutput)

Constructors

 o AliasCollection
 public AliasCollection()
 o AliasCollection
 public AliasCollection(Collection c)

Methods

 o link
 public 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 void conceal(Symbol a)
 o reveal
 public void reveal(Symbol a)
 o partialLink
 public 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 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 sort
 public void sort()
Sorts the elements in this linked trie

 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 getExact
 public Symbol getExact(String key)
 o getTrieFor
 public Object getTrieFor(String match)
 o getElementAt
 public Symbol getElementAt(int c)
 o removeElementAt
 public 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 void writeTo(DataOutput to) throws IOException
 o loadFrom
 public void loadFrom(DataInput from) throws IOException
 o deallocate
 public void deallocate()
 o concealable
 public void concealable(boolean t)
 o removeSecondaries
 public void removeSecondaries(AliasListKey alk)
 o addSecondaries
 public void addSecondaries(AliasListKey alk,
                            Symbol o)

All Packages  Class Hierarchy  This Package  Previous  Next  Index