net.xqhs.graphs.graph
Class HyperNode
java.lang.Object
net.xqhs.graphs.representation.AbstractVisualizableGraphComponent
net.xqhs.graphs.graph.SimpleNode
net.xqhs.graphs.graph.HyperNode
- All Implemented Interfaces:
- GraphComponent, Node, VisualizableGraphComponent
public class HyperNode
- extends SimpleNode
The class is a Node
implementation that represents a node in a hyper graph, i.e. a node that contains a
Graph
inside it.
The label of a hyper node is optional, therefore the node is initially created with a null
label.
- Author:
- Andrei Olaru
Constructor Summary |
HyperNode(Graph graph)
Creates a new HyperNode instance, by initializing it with its subordinate graph. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
nodeContents
Graph nodeContents
- The
Graph
contained by this node.
representation
TextGraphRepresentation representation
- The representation for the content of the node, which is returned on the call of
toString()
.
HyperNode
public HyperNode(Graph graph)
- Creates a new
HyperNode
instance, by initializing it with its subordinate graph.
The label of the hyper node is optional, and it can be set using setLabel(String)
;
- Parameters:
graph
- - the graph contained by this node.
setLabel
public HyperNode setLabel(java.lang.String nodeLabel)
- Sets the label of the node.
- Parameters:
nodeLabel
- - the label.
- Returns:
- the instance itself.
toString
public java.lang.String toString()
- Overrides:
toString
in class SimpleNode