Package com.alexmerz.graphviz.objects
Class Node
java.lang.Object
com.alexmerz.graphviz.objects.Node
This class represents a node in a graph.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String key) Returns the attribute of the nodeReturns all attributes of the edge.getId()Returns the id object for the nodebooleanReturns true, if the node object represents a subgraph.voidrepresentsSubgraph(boolean isSubgraph) Sets, if the node represents a subgraphvoidsetAttribute(String key, String value) Sets the attribute of the nodevoidSets the Id object for this nodetoString()Returns a string representation of this node If the node is a subgraph, an empty string will be returned
-
Constructor Details
-
Node
public Node()
-
-
Method Details
-
getId
Returns the id object for the node- Returns:
- the Id object
-
setId
Sets the Id object for this node- Parameters:
id-
-
toString
Returns a string representation of this node If the node is a subgraph, an empty string will be returned -
getAttribute
Returns the attribute of the node- Parameters:
key- the name of the attribute- Returns:
- the value of the attribute
-
setAttribute
Sets the attribute of the node- Parameters:
key- the name of the attributevalue- the value of the attribute
-
isSubgraph
public boolean isSubgraph()Returns true, if the node object represents a subgraph.- Returns:
- true or false
-
representsSubgraph
public void representsSubgraph(boolean isSubgraph) Sets, if the node represents a subgraph- Parameters:
isSubgraph- true if subgraph is used in edge operation
-
getAttributes
Returns all attributes of the edge.- Returns:
- the edge attributes.
-