com.phoenixst.plexus.examples

Class FileSystemForest

public class FileSystemForest extends AbstractGraph implements OrientedForest

A lazy forest graph of the local file system. The single instance of this class should be retrieved through the FileSystemForest method.

Since: 1.0

Version: $Revision: 1.21 $

Author: Ray A. Conner

Method Summary
TraverserchildTraverser(Object node)
booleancontainsEdge(Graph.Edge edge)
booleancontainsNode(Object node)
intdegree(Object node)
protected Collectionedges()
intgetDepth(Object node)
intgetHeight(Object node)
static FileSystemForestgetInstance()
ObjectgetLeastCommonAncestor(Object aNode, Object bNode)
ObjectgetParent(Object node)
Graph.EdgegetParentEdge(Object node)
ObjectgetParentEndpoint(Graph.Edge edge)
ObjectgetRoot(Object node)
booleanisAncestor(Object ancestor, Object descendant)
booleanisForestEdge(Edge edge)
booleanisLeaf(Object node)
protected Collectionnodes()
booleanremoveNode(Object node)
CollectionrootNodes()
protected Traversertraverser(Object node)

Method Detail

childTraverser

public Traverser childTraverser(Object node)

containsEdge

public boolean containsEdge(Graph.Edge edge)

containsNode

public boolean containsNode(Object node)

degree

public int degree(Object node)

edges

protected Collection edges()

getDepth

public int getDepth(Object node)

getHeight

public int getHeight(Object node)

getInstance

public static final FileSystemForest getInstance()

getLeastCommonAncestor

public Object getLeastCommonAncestor(Object aNode, Object bNode)

getParent

public Object getParent(Object node)

getParentEdge

public Graph.Edge getParentEdge(Object node)

getParentEndpoint

public Object getParentEndpoint(Graph.Edge edge)

getRoot

public Object getRoot(Object node)

isAncestor

public boolean isAncestor(Object ancestor, Object descendant)

isForestEdge

public boolean isForestEdge(Edge edge)

isLeaf

public boolean isLeaf(Object node)

nodes

protected Collection nodes()

removeNode

public boolean removeNode(Object node)

rootNodes

public Collection rootNodes()

traverser

protected Traverser traverser(Object node)
See the Plexus project home, hosted by SourceForge.
Copyright B) 1994-2006, by Phoenix Software Technologists, Inc. and others. All Rights Reserved. Use is subject to license terms.