com.sri.emo.dbobj.model_tree
Class DefaultModel

java.lang.Object
  extended by com.sri.emo.dbobj.model_tree.DefaultModel
All Implemented Interfaces:
Model

public class DefaultModel
extends Object
implements Model

Default implementation of the 'model' interface. Provides concrete implementations of access to the iterator() function and all other requirements of the Model interface. Most of the guts of the model, however, are stored in DefaultModelNode

Author:
Michael Rimov

Constructor Summary
DefaultModel(ModelNode modelRoot)
          Constructor that takes the
 
Method Summary
 ModelNode getRoot()
          Retrieves the root of the tree hierarchy to allow for manual manipulation if needed.
 Iterator iterator()
          Allows for the client to visit the nodes one-by-one.
 Iterator iterator(TreeTraversalListener traversallistener)
          Allows for client to visit nodes one by one as well as be notified whenever traversal in the internal composite tree occurs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultModel

public DefaultModel(ModelNode modelRoot)
Constructor that takes the

Parameters:
modelRoot - ModelCompositeNode
Method Detail

iterator

public Iterator iterator()
Allows for the client to visit the nodes one-by-one.

Specified by:
iterator in interface Model
Returns:
Iterator

iterator

public Iterator iterator(TreeTraversalListener traversallistener)
Allows for client to visit nodes one by one as well as be notified whenever traversal in the internal composite tree occurs.

Specified by:
iterator in interface Model
Parameters:
traversallistener - TreeTraversalListener
Returns:
Iterator

getRoot

public ModelNode getRoot()
Retrieves the root of the tree hierarchy to allow for manual manipulation if needed.

Specified by:
getRoot in interface Model
Returns:
ModelCompositeNode


Copyright © 2004-2006 Codeguild, Inc.. All Rights Reserved.