I need to store Boolean expressions like this:
x1 AND x2 AND x3 OR (x4 AND x5) AND (NOT x6)
Each x
variable is a Boolean expression like ==
or !=
with values. The problem is to store nested AND
and OR
clauses (inside themselves and/or inside each other) and wrap them with NOT
. The wrapping depth can be very deep.
Does the Java SDK have data structure for these expressions?