All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class key.Container

java.lang.Object
   |
   +----key.Atom
           |
           +----key.Container

public class Container
extends Atom
implements Parent, Referrer

Variable Index

 o addToAction
is allowed to add objects to this container
 o assumedContents
 o concealInAction
can conceal atoms in this container
 o constrainedType
 o countContents
 o limitProperty
 o reference
 o referenceProperty
 o removeFromAction
is allowed to remove objects from this container
 o revealInAction
can reveal atoms in this container
 o sortAction
can sort atoms in this container
 o staticActions

Constructor Index

 o Container()
 o Container(boolean)

Method Index

 o add(Atom)
Adds the supplied atom and sets its parent to this
 o add(Tag)
Doesn't do a lot of the checking a 'traditional' add does - container limits, constrained types - none of these are checked.
 o addInternal(Atom)
Internal routine so overloading add()'s don't get confused
 o addTopLevel(Container)
Adds all the symbols in this container to the provided Container This container retains a reference to its elements, but full ownership (the elements parents) is given to the new container.
 o alias(Atom)
 o argument(String)
The argument to a container is the class to constrain contained objects to
 o contains(Atom)
 o containsAction(Action)
Returns true if the action is supported by this class.
 o count()
 o delete(Atom)
 o dispose()
This is a method that should be called only once.
 o elements()
This function returns Tags?
 o evalReadOnlyProperty(ReadOnlyProperty)
override to return the correct value for the supplied property make sure you call super.evalReadOnlyProperty if you don't understand it before returning null
 o finalize()
 o fullResolve()
Ensures that all the sub-objects of this component have been resolved as well.
 o getAction(String)
Returns the action corresponding to the supplied name.
 o getActions()
Returns a list of the actions supported by this class.
 o getConstraint()
 o getElement(String)
 o getElementAt(int)
 o getExactElement(String)
 o getParentId()
see Parent.java
 o getSymbol(String)
Full search for the symbol of id s.
 o getSymbol(StringTokenizer, boolean)
Returns the symbol specified by the tokenizer.
This function requires that it is passed a stringtokenizer containing elements like:

Variables

 o reference
 protected boolean reference
 o referenceProperty
 protected ReadOnlyProperty referenceProperty
 o countContents
 protected ReadOnlyProperty countContents
 o limitProperty
 protected DataProperty limitProperty
 o constrainedType
 protected Type constrainedType
 o assumedContents
 protected boolean assumedContents
 o staticActions
 protected static StringKeyCollection staticActions
 o addToAction
 public static Action addToAction
is allowed to add objects to this container

 o removeFromAction
 public static Action removeFromAction
is allowed to remove objects from this container

 o concealInAction
 public static Action concealInAction
can conceal atoms in this container

 o revealInAction
 public static Action revealInAction
can reveal atoms in this container

 o sortAction
 public static Action sortAction
can sort atoms in this container

Constructors

 o Container
 public Container()
 o Container
 public Container(boolean ref)

Methods

 o partialLoad
 public void partialLoad()
Overrides:
partialLoad in class Atom
 o argument
 public void argument(String args) throws IllegalArgumentException
The argument to a container is the class to constrain contained objects to

Overrides:
argument in class Atom
 o getConstraint
 public Type getConstraint()
 o setConstraint
 protected void setConstraint(Type c)
 o isReference
 public final boolean isReference()
 o add
 protected void add(Tag t) throws BadKeyException, NonUniqueKeyException
Doesn't do a lot of the checking a 'traditional' add does - container limits, constrained types - none of these are checked. Also, recursive joins (more than one) aren't supported here. If thats the little tidbit of information you're looking for, then I bet you had to search ;p~

 o addInternal
 protected void addInternal(Atom added) throws BadKeyException, NonUniqueKeyException
Internal routine so overloading add()'s don't get confused

Parameters:
full - true if you want a full link, if false, only partial link
 o add
 public void add(Atom added) throws BadKeyException, NonUniqueKeyException
Adds the supplied atom and sets its parent to this

 o alias
 public void alias(Atom toAlias)
 o unalias
 public void unalias(Atom toNormal)
 o rekey
 public void rekey(Atom toRekey,
                   AliasListKey newAlk)
Used primarily in the 'Many' command.

 o sort
 public final void sort()
 o remove
 public void remove(Atom removed) throws NonUniqueKeyException, NoSuchElementException, BadKeyException
removes the atom. if this is its parent container, specifies that the atom should be disposed of (deleted)

 o removeInternal
 protected void removeInternal(Atom removed) throws NonUniqueKeyException, NoSuchElementException, BadKeyException
 o noSideEffectRemove
 protected void noSideEffectRemove(Atom removed) throws NonUniqueKeyException, NoSuchElementException, BadKeyException
 o swapout
 public void swapout(Atom a)
 o delete
 public void delete(Atom a)
 o removeByNumber
 public void removeByNumber(int c) throws NonUniqueKeyException, BadKeyException
 o getElementAt
 public final Symbol getElementAt(int n)
 o limit
 public void limit(int amount)
 o getTrieFor
 public final Object getTrieFor(String m)
 o addTopLevel
 public void addTopLevel(Container addTo)
Adds all the symbols in this container to the provided Container This container retains a reference to its elements, but full ownership (the elements parents) is given to the new container. (ie, the parents of all elements in this container are passed to the parent container)

 o elements
 public final Enumeration elements()
This function returns Tags?

 o tagElements
 public final Enumeration tagElements()
 o swapout
 public void swapout()
Similar to dispose(), the swapout() method prepares a Atom to be swapped out non-destructively You should probably sync() before doing this...

Overrides:
swapout in class Atom
 o dispose
 public void dispose()
This is a method that should be called only once.

Overrides:
dispose in class Atom
 o loadFrom
 public void loadFrom(DataInput from) throws IOException
Overrides:
loadFrom in class Atom
 o resolve
 public void resolve()
This completely overrides super.resolve(), which is called from fullResolve() when that happens.

Overrides:
resolve in class Atom
 o fullResolve
 public void fullResolve()
Ensures that all the sub-objects of this component have been resolved as well.

Overrides:
fullResolve in class Atom
 o readContents
 protected void readContents(DataInput from) throws IOException
 o writeTo
 public void writeTo(DataOutput to) throws IOException
Overrides:
writeTo in class Atom
 o writeContents
 protected void writeContents(DataOutput to) throws IOException
 o count
 public final int count()
 o getSymbol
 public Object getSymbol(String s)
Full search for the symbol of id s.

Overrides:
getSymbol in class Atom
 o evalReadOnlyProperty
 public Object evalReadOnlyProperty(ReadOnlyProperty p)
override to return the correct value for the supplied property make sure you call super.evalReadOnlyProperty if you don't understand it before returning null

Overrides:
evalReadOnlyProperty in class Atom
 o getSymbol
 protected Object getSymbol(StringTokenizer st,
                            boolean resolveTags)
Returns the symbol specified by the tokenizer.
This function requires that it is passed a stringtokenizer containing elements like:

if the tokenizer doesn't start with a . it is assumed (but only one)

Returns:
atom, a property, or null, or a Trie if a Trie is returned, it will contain tags, not the actual atoms
Overrides:
getSymbol in class Atom
 o getTagElement
 public final Object getTagElement(String s)
 o getElement
 public final Object getElement(String s)
 o getExactElement
 public final Object getExactElement(String s)
 o getParentId
 public String getParentId()
see Parent.java

 o noLongerReferencing
 public void noLongerReferencing(Atom a)
see Parent.java

 o contains
 public final boolean contains(Atom a)
 o getActions
 public Enumeration getActions()
Returns a list of the actions supported by this class.

Overrides:
getActions in class Atom
 o containsAction
 public boolean containsAction(Action a)
Returns true if the action is supported by this class.

Overrides:
containsAction in class Atom
 o getAction
 public Action getAction(String name)
Returns the action corresponding to the supplied name. This routine will need to be overriden by sub-classes using actions.

Overrides:
getAction in class Atom
 o getTotalContainers
 public static int getTotalContainers()
 o finalize
 protected void finalize() throws Throwable
Overrides:
finalize in class Atom

All Packages  Class Hierarchy  This Package  Previous  Next  Index