net.xqhs.graphs.graph
Class HyperNode

java.lang.Object
  extended by net.xqhs.graphs.representation.AbstractVisualizableGraphComponent
      extended by net.xqhs.graphs.graph.SimpleNode
          extended by 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

Field Summary
(package private)  Graph nodeContents
          The Graph contained by this node.
(package private)  TextGraphRepresentation representation
          The representation for the content of the node, which is returned on the call of toString().
 
Fields inherited from class net.xqhs.graphs.graph.SimpleNode
label
 
Fields inherited from class net.xqhs.graphs.representation.AbstractVisualizableGraphComponent
representations
 
Constructor Summary
HyperNode(Graph graph)
          Creates a new HyperNode instance, by initializing it with its subordinate graph.
 
Method Summary
 HyperNode setLabel(java.lang.String nodeLabel)
          Sets the label of the node.
 java.lang.String toString()
           
 
Methods inherited from class net.xqhs.graphs.graph.SimpleNode
getLabel
 
Methods inherited from class net.xqhs.graphs.representation.AbstractVisualizableGraphComponent
addRepresentation, getFirstRepresentationForRoot, getRepresentations, getRepresentationsForRoot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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().

Constructor Detail

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.
Method Detail

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