Added support for equality and inequality operations❗
Both equality and inequality expressions evaluate to either 1.0(representing true) or 0.0(representing false).
A convivence has been added to the StrEvaluate class that allows evaluation of an expression to directly return a Java boolean object
Equality and inequality operations are expressions meaning that they evaluate to a value, the following is a valid expression (1 == 1) + 1 when evaluated this expression evaluates to 2.0. The equality expression evaluates to 1.0(true) and then 1 is added to this value. Note that the convenience method for boolean comparisons expressions would return a value of false when evaluating this expression.
Equality
The equality operator is represented by a double equals sign: ==. The operator evaluates an expression to the left and the right and determines if the result of each evaluation was the same. If both sides are the same the expression evaluates to 1.0(true) otherwise it evaluates to 0.0(false).
Inequality
The inequality operator is represented by a bang followed by an equals sign: !=. The operator evaluates an expression to the left and the right and determines if the result of each evaluation was different. If both sides were different the expression evaluates to '1.0' (true) otherwise it evaluates to 0.0(false).
Added support for equality and inequality operations❗
Both equality and inequality expressions evaluate to either
1.0
(representing true) or0.0
(representing false).StrEvaluate
class that allows evaluation of an expression to directly return a Java boolean object(1 == 1) + 1
when evaluated this expression evaluates to2.0
. The equality expression evaluates to1.0
(true) and then1
is added to this value. Note that the convenience method for boolean comparisons expressions would return a value offalse
when evaluating this expression.Equality The equality operator is represented by a double equals sign:
==
. The operator evaluates an expression to the left and the right and determines if the result of each evaluation was the same. If both sides are the same the expression evaluates to1.0
(true) otherwise it evaluates to0.0
(false).Inequality The inequality operator is represented by a bang followed by an equals sign:
!=
. The operator evaluates an expression to the left and the right and determines if the result of each evaluation was different. If both sides were different the expression evaluates to '1.0' (true) otherwise it evaluates to0.0
(false).