Module logicng

Class GraphicalNode


  • public class GraphicalNode
    extends Object
    A single node in a graphical representation of a formula, BDD, or graph. A node holds a unique ID, a label, a flag whether this is a terminal node or not, and a node style.
    Since:
    2.4.0
    Version:
    2.4.0
    • Constructor Detail

      • GraphicalNode

        public GraphicalNode​(String id,
                             String label,
                             GraphicalNodeStyle style)
        Constructs a new non-terminal graphical node with the given values.
        Parameters:
        id - the unique ID
        label - the label
        style - the style of the node
      • GraphicalNode

        public GraphicalNode​(String id,
                             String label,
                             boolean terminal,
                             GraphicalNodeStyle style)
        Constructs a new graphical node with the given values.
        Parameters:
        id - the unique ID
        label - the label
        terminal - whether it is a terminal node or not
        style - the style of the node
    • Method Detail

      • getId

        public String getId()
        Returns the id of this node.
        Returns:
        the if of this node
      • getLabel

        public String getLabel()
        Returns the label of this node.
        Returns:
        the label of this node
      • isTerminal

        public boolean isTerminal()
        Returns whether this node is a terminal.
        Returns:
        true if this node is a terminal, otherwise false
      • getStyle

        public GraphicalNodeStyle getStyle()
        Returns the style of this node.
        Returns:
        the style of this node
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object