ptolemy.graph
Class GraphElementException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
ptolemy.graph.GraphException
ptolemy.graph.GraphElementException
- All Implemented Interfaces:
- java.io.Serializable
public class GraphElementException
- extends GraphException
The exception of accessing graph elements in wrong ways. This exception
could be caused by accessing nonexistent elements or elements with incorrect
association values.
- Since:
- Ptolemy II 2.1
- Version:
- $Id: GraphElementException.java 57040 2010-01-27 20:52:32Z cxh $
- Author:
- Mingyung Ko, Shuvra S. Bhattacharyya
- See Also:
- Serialized Form
- Accepted Rating:
- Proposed Rating:
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
GraphElementException
public GraphElementException(java.lang.String message)
- Constructor for a given message.
- Parameters:
message
- The message.
GraphElementException
public GraphElementException(Element element,
Graph graph,
java.lang.String message)
- Constructor with arguments of element, graph, and a message.
- Parameters:
element
- The invalid element.graph
- The graph accessed.message
- The exception message.
checkNode
public static void checkNode(Node node,
Graph graph)
- Verify that a node is in the container graph.
- Parameters:
node
- The node to verify.graph
- The container graph.
- Throws:
java.lang.IllegalArgumentException
- If the node is not in the graph.
checkEdge
public static void checkEdge(Edge edge,
Graph graph)
- Verify that an edge is in the container graph.
- Parameters:
edge
- The edge to verify.graph
- The container graph.
- Throws:
java.lang.IllegalArgumentException
- If the edge is not in the graph.
_argumentsToString
private static java.lang.String _argumentsToString(Element element,
Graph graph,
java.lang.String message)