- java.lang.Object
-
- org.logicng.io.graphical.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 Summary
Constructors Constructor Description GraphicalNode(String id, String label, boolean terminal, GraphicalNodeStyle style)Constructs a new graphical node with the given values.GraphicalNode(String id, String label, GraphicalNodeStyle style)Constructs a new non-terminal graphical node with the given values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetId()Returns the id of this node.StringgetLabel()Returns the label of this node.GraphicalNodeStylegetStyle()Returns the style of this node.inthashCode()booleanisTerminal()Returns whether this node is a terminal.StringtoString()
-
-
-
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 IDlabel- the labelstyle- 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 IDlabel- the labelterminal- whether it is a terminal node or notstyle- 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:
trueif this node is a terminal, otherwisefalse
-
getStyle
public GraphicalNodeStyle getStyle()
Returns the style of this node.- Returns:
- the style of this node
-
-