net.sourceforge.esw.graph.context
Class DefaultNodeContextFactory

java.lang.Object
  |
  +--net.sourceforge.esw.graph.context.DefaultNodeContextFactory
All Implemented Interfaces:
INodeContextFactory, java.io.Serializable

public class DefaultNodeContextFactory
extends java.lang.Object
implements INodeContextFactory

Default context for creation of a single INode instance, or a graph of INode instances.

INodeContextFactory implementors can use this factory to control creational behavior and patterns for INode instances. It allows the program to specifiy the semantics used when creating a graph of INode instances, or a single INode instance. It allows a one-step indirection for INode creation beyond the NodeFactory.

This concrete implementation of the INodeContextFactory interface delegates all requests for creation of INode instances to the NodeFactory.

See Also:
NodeFactory, Serialized Form

Constructor Summary
DefaultNodeContextFactory()
           
 
Method Summary
 INode getGraph()
          Returns a graph of newly created INode instances.
 INode getSingleNode()
          Returns a newly created INode instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultNodeContextFactory

public DefaultNodeContextFactory()
Method Detail

getGraph

public INode getGraph()
Returns a graph of newly created INode instances.

This implementation returns a single INode instance returned from a call to NodeFactory.createNode().

Specified by:
getGraph in interface INodeContextFactory

getSingleNode

public INode getSingleNode()
Returns a newly created INode instance.

Implementors can use this method to allow single INode instances to be added to a graph that follow the semantics of the INode instances created via the getGraph method.

This implementation returns a single INode instance returned from a call to NodeFactory.createNode().

Specified by:
getSingleNode in interface INodeContextFactory


Copyright 2002 Free Software Foundation. All Rights Reserved.