Comparison operations

Syntax

expression1 == expression2
or
expression1 != expression2
or
expression1 <= expression2
or
expression1 < expression2
or
expression1 >= expression2
or
expression1 > expression2

where:

Description

These comparison expressions are the same as in usual languages.

The left and right hand sides of the comparison must have the same type (i.e. strings can only be compared to strings and numbers can only be compared to numbers, etc.) or else an error will abort the evaluation process.

Note that MDWorkbench does exact comparison, so string comparisons are case and white-space sensitive: "x" and "x " and "X" are not equal values. MDWorkench uses Java equals() method on operands to test equality.

Examples

class.name == "Account"

myClass != anotherClass

class.feature.size() > 2