Bees v0.5.0 API

bees.core
Class ObjectTree

java.lang.Object
  |
  +--bees.core.ObjectTree

public final class ObjectTree
extends java.lang.Object

A class used to maintain a hierarchy of objects in the system.


Field Summary
static char SEPARATOR
          The character used to separate qualified names.
 
Constructor Summary
ObjectTree()
          Construct an empty object getTree().
 
Method Summary
 boolean contains(java.lang.String name)
           
 java.lang.Object get(java.lang.String name)
          Get an object from the tree using a fully qualified name.
 ObjectMap getRootMap()
           
 void put(java.lang.String name, java.lang.Object newobj)
          Put an object in the getTree().
 java.lang.Object remove(java.lang.String name)
          Remove an object from the tree using a fully qualified name.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SEPARATOR

public static final char SEPARATOR
The character used to separate qualified names.
Constructor Detail

ObjectTree

public ObjectTree()
Construct an empty object getTree().
Method Detail

getRootMap

public ObjectMap getRootMap()
Returns:
The root ObjectMap of the getTree().

get

public java.lang.Object get(java.lang.String name)
                     throws java.util.NoSuchElementException
Get an object from the tree using a fully qualified name.
Parameters:
name - The qualified name of the object.
Returns:
The named object.
Throws:
Throws - NoSuchElementException if the object couldn't be found.

contains

public boolean contains(java.lang.String name)

remove

public java.lang.Object remove(java.lang.String name)
                        throws java.util.NoSuchElementException
Remove an object from the tree using a fully qualified name.
Parameters:
name - The qualified name of the object.
Returns:
The named object.
Throws:
Throws - NoSuchElementException if the object couldn't be
found. -  

put

public void put(java.lang.String name,
                java.lang.Object newobj)
Put an object in the getTree(). If parts of the hierarchy as given by the name are missing then they will automatically be filled in with HashMaps.
Parameters:
name - The qualified name of the object.
newobj - The object to put in the getTree().

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Bees v0.5.0 API

This documentation is Copyright (C) 2002 The University of Utah. All Rights Reserved. See the individual source files for distribution terms.
Documentation, software, and mailing lists for Bees v0.5.0 can be found at the Janos Project: http://www.cs.utah.edu/flux/janos/