Class Node

java.lang.Object
com.alexmerz.graphviz.objects.Node

public class Node extends Object
This class represents a node in a graph.
  • Constructor Details

    • Node

      public Node()
  • Method Details

    • getId

      public Id getId()
      Returns the id object for the node
      Returns:
      the Id object
    • setId

      public void setId(Id id)
      Sets the Id object for this node
      Parameters:
      id -
    • toString

      public String toString()
      Returns a string representation of this node If the node is a subgraph, an empty string will be returned
      Overrides:
      toString in class Object
      Returns:
      the string representation
    • getAttribute

      public String getAttribute(String key)
      Returns the attribute of the node
      Parameters:
      key - the name of the attribute
      Returns:
      the value of the attribute
    • setAttribute

      public void setAttribute(String key, String value)
      Sets the attribute of the node
      Parameters:
      key - the name of the attribute
      value - 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

      public Hashtable<String,String> getAttributes()
      Returns all attributes of the edge.
      Returns:
      the edge attributes.