com.vinculumtech.carrierwave.plan
Class GraphNodeHelper

java.lang.Object
  extended bycom.vinculumtech.carrierwave.plan.GraphNodeHelper

public final class GraphNodeHelper
extends java.lang.Object

The GraphNodeHelper provides utilites for use with GraphNode instances.

Version:
$Id: //depot/carrierwave/src/shared/com/vinculumtech/carrierwave/plan/GraphNodeHelper.java#11 $

Method Summary
static GraphNode cloneGraphNode(GraphNode graphNode)
          Safely clones the given GraphNode instance.
static GraphNode findPeerNodeFor(GraphNodeSet graphNodeSet, Image image)
           
static java.util.Comparator getNodeDepthComparator()
          Returns a comparator that orders GraphNode elements in descending order.
static boolean isNodeDependent(GraphNode graphNode)
          Returns true if the given GraphNode instance is a dependent type or literal.
static boolean isNodeOfThisType(GraphNode graphNode, Image image)
           
static GraphNode makeGraphNodeFor(Icon icon)
           
static void sortGraphNodes(java.util.List graphNodes)
          Sorts the given List of GraphNode instances by depth, in descending order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

makeGraphNodeFor

public static final GraphNode makeGraphNodeFor(Icon icon)
Parameters:
icon -
Returns:

sortGraphNodes

public static final void sortGraphNodes(java.util.List graphNodes)
Sorts the given List of GraphNode instances by depth, in descending order.

Parameters:
graphNodes -

isNodeDependent

public static final boolean isNodeDependent(GraphNode graphNode)
Returns true if the given GraphNode instance is a dependent type or literal.

Parameters:
graphNode -
Returns:

isNodeOfThisType

public static final boolean isNodeOfThisType(GraphNode graphNode,
                                             Image image)
                                      throws GraphException
Parameters:
image -
Returns:
true if the given Image instance is assignable to the type this GraphNode instance represents
Throws:
GraphException

findPeerNodeFor

public static final GraphNode findPeerNodeFor(GraphNodeSet graphNodeSet,
                                              Image image)
                                       throws GraphException
Throws:
GraphException

getNodeDepthComparator

public static final java.util.Comparator getNodeDepthComparator()
Returns a comparator that orders GraphNode elements in descending order.

Returns:

cloneGraphNode

public static final GraphNode cloneGraphNode(GraphNode graphNode)
Safely clones the given GraphNode instance.

Parameters:
graphNode -
Returns:


Copyright (C) 2002 Vinculum Technologies, Inc. All Rights Reserved.