public class Node extends Object implements Cloneable
| Constructor and Description |
|---|
Node()
Creates a new Node with condition=false, name="", probability=0, comparison=Comparison.EQU and checkFailed=false.
|
Node(String name)
Creates a new Node with condition=false, probability=0, comparison=Comparison.EQU, checkFailed=false and name from argument.
|
| Modifier and Type | Method and Description |
|---|---|
Node |
clone()
Returns a clone of this node.
|
Comparison |
getComparison()
This method returns the comparison of this node.
|
String |
getName()
This method returns the name (or description) of the node.
|
float |
getProbability()
This method returns the probability in percent (%).
Please note: Since the probability is provided in percent a value of 0.01 means 1%, 0.1 means 10% and 1.0 means 100%! Otherwise it would be impossible to compute correct results without additional operations. |
boolean |
isCheckFailed()
This method tells a client that a check regarding to properties of this node failed.
|
boolean |
isCondition()
This method returns if this node is either a condition or an action.
Decision tables are about "if (condition) then (action)". |
protected void |
setCheckFailed(boolean result)
This method tells a client that a check regarding to properties of this node failed.
|
void |
setComparison(Comparison comparison)
This method sets the comparison of this node.
|
void |
setCondition(boolean condition)
This method tells if this node is either a condition or an action.
Decision tables are about "if (condition) then (action)". |
void |
setName(String name)
This method sets the name (or description) of the node.
|
void |
setProbability(float probability)
This method sets the probability in percent (%).
Please note: Since the probability is provided in percent a value of 0.01 means 1%, 0.1 means 10% and 1.0 means 100%! Otherwise it would be impossible to compute correct results without additional operations. |
public Node()
public Node(String name)
name - the name (or description) of this nodepublic Node clone()
public boolean isCondition()
public void setCondition(boolean condition)
condition - true = this is a condition; false = this is an actionpublic String getName()
public void setName(String name)
name - name of the node (i.e. "press return key")public float getProbability()
public void setProbability(float probability)
probability - the probability in percent (%)public Comparison getComparison()
public void setComparison(Comparison comparison)
comparison - the comparison to setpublic boolean isCheckFailed()
protected void setCheckFailed(boolean result)
result - true if the check failed; false if the check passedCopyright © 2013. All Rights Reserved.