|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object extended byptolemy.graph.Element extended byptolemy.graph.Node
An optionally-weighted node for an undirected or directed graph. More specifically, a node consists of an optional weight (an arbitrary object that is associated with the node). We say that a node is unweighted if it does not have an assigned weight. It is an error to attempt to access the weight of an unweighted node. Node weights must be genuine (non-null) objects.
Edge
| Field Summary |
| Fields inherited from class ptolemy.graph.Element |
_weight |
| Constructor Summary | |
Node()
Construct an unweighted node. |
|
Node(java.lang.Object weight)
Construct a node with a given node weight. |
|
| Method Summary | |
java.lang.String |
descriptor()
A one-word description of the type of this graph element. |
java.lang.String |
toString()
Return a string representation of the node. |
| Methods inherited from class ptolemy.graph.Element |
getWeight, hasWeight, removeWeight, setWeight |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Node()
public Node(java.lang.Object weight)
weight - The given weight.
java.lang.IllegalArgumentException - If the specified weight is
null.| Method Detail |
public java.lang.String descriptor()
descriptor in class Elementpublic java.lang.String toString()
"<unweighted node>" if
the node is unweighted.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||