Hi,
From what I see in the code
("org.drools.base.evaluators.ComparableEvaluatorsDefinition" class),
comparison operators have different implementations depending on the
type of the arguments. For Integer, it uses the intValue() and the <
operator. There a many pre-defined type but, in the end, the Object type
seems to be implemented by casting arguments to "Comparable" then using
the compareTo() method.
Bruno.
Ji Oh Yoo a écrit :
Hi,
In drools rules, we can use "<" or ">" (also "<="
and ">") to write
conditions
with numbers and strings.
But how does it work?
My question is, does it call the compareTo() method?
If it does, will those operators work with any objects inherited from
Comparable<T>?
Thanks.