gumbo.util.relation
Class AbstractTreeNodeDelegator

java.lang.Object
  |
  +--gumbo.util.AbstractDisposable
        |
        +--gumbo.util.relation.AbstractTreeNodeDelegator
All Implemented Interfaces:
Disposable, java.io.Serializable
Direct Known Subclasses:
AbstractIntersectionNode, AbstractSpaceNode

public abstract class AbstractTreeNodeDelegator
extends AbstractDisposable
implements Disposable, java.io.Serializable

A partial implementation for a TreeNode delegator. Implements Serializable to be consistent with AbstractTreeNode. Implements Disposable to mutually dispose the tree node delegate.

Version:
$Revision: 1.1 $
Author:
Jon Barrilleaux (jonb@jmbaai.com) of JMB and Associates Inc.
See Also:
Serialized Form

Constructor Summary
AbstractTreeNodeDelegator()
          Creates an instance.
 
Method Summary
protected  TreeNode getTreeNodeDelegate()
          Returns the tree node delegate.
protected  void implDispose()
          Called by dispose() before the disposed flag is set, when it is time for subclasses to dispose themselves.
protected abstract  TreeNode newTreeNodeDelegate()
          Called during initialization as the factory method for the tree node delegate.
 
Methods inherited from class gumbo.util.AbstractDisposable
dispose, isDisposed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gumbo.util.Disposable
dispose, isDisposed
 

Constructor Detail

AbstractTreeNodeDelegator

public AbstractTreeNodeDelegator()
Creates an instance. Master constructor.

Method Detail

newTreeNodeDelegate

protected abstract TreeNode newTreeNodeDelegate()
Called during initialization as the factory method for the tree node delegate. The delegate's delegator must either be uninitialized or this object.

Returns:
Reference to the delegate. Never null.

getTreeNodeDelegate

protected final TreeNode getTreeNodeDelegate()
Returns the tree node delegate.

Returns:
Reference to the delegate. Never null.

implDispose

protected void implDispose()
Description copied from class: AbstractDisposable
Called by dispose() before the disposed flag is set, when it is time for subclasses to dispose themselves. Implentors should disconnect and/or dispose any relations (while the object is still valid), then null out any external references, and then call super.implDispose() to assure that the super class is disposed of properly.

Specified by:
implDispose in class AbstractDisposable