Class CloneHelper
java.lang.Object
net.sf.jsqlparser.util.cnfexpression.CloneHelper
This class is mainly used for handling the cloning of an expression tree. Note this is the shallow copy of the tree.
That means I do not modify or copy the expression other than these expressions: AND, OR, NOT, (), MULTI-AND,
MULTI-OR. Since the CNF conversion only change the condition part of the tree.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Expression
changeBack
(Boolean isMultiOr, Expression exp) This helper method is used to change the multiple expression into the binary form, respectively and return the root of the expression tree.static Expression
modify
(Expression express) static Expression
shallowCopy
(Expression express) This method is used to copy the expression which happens at step four.
-
Constructor Details
-
CloneHelper
CloneHelper()
-
-
Method Details
-
modify
-
shallowCopy
This method is used to copy the expression which happens at step four. I only copy the conditional expressions since the CNF only changes the conditional part.- Parameters:
express
- the expression that will be copied.- Returns:
- the copied expression.
-
changeBack
This helper method is used to change the multiple expression into the binary form, respectively and return the root of the expression tree.- Parameters:
isMultiOr
- variable tells whether the expression is or.exp
- the expression that needs to be converted.- Returns:
- the root of the expression tree.
-