All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class key.NumberedCollection

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

public final class NumberedCollection
extends Object
implements Collection
The numberedCollection is based on a hashtable of integers. Every symbol thats added to it is required to be an instance of 'Numbered', and it will be automatically numbered and added to the container. The numbered collection is mainly intended for mail and news and so forth, and is generally reverse ordered


Constructor Index

 o NumberedCollection()

Method Index

 o conceal(Symbol)
 o concealable(boolean)
 o contains(Symbol)
 o count()
 o deallocate()
 o elements()
 o get(Integer)
 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)
 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 NumberedCollection
 public NumberedCollection()

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 get
 public Object get(Integer match)
 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
 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)

All Packages  Class Hierarchy  This Package  Previous  Next  Index