Class CompareToComparableDatatype

java.lang.Object
org.faktorips.fl.operations.AbstractBinaryOperation<org.faktorips.codegen.JavaCodeFragment>
org.faktorips.fl.operations.AbstractBinaryJavaOperation
org.faktorips.fl.operations.CompareToComparableDatatype
All Implemented Interfaces:
BinaryOperation<org.faktorips.codegen.JavaCodeFragment>

public class CompareToComparableDatatype extends AbstractBinaryJavaOperation
This is a generic operation for comparable datatypes to. It allows to use greater than, greater or equal, less than and less or equal, according to the operator. Important for this generic operation is, that the given operator is the same as it is used in java code! It is simply transformed to be used with the Comparable.compareTo(Object) method comparing zero.

Example:
For the operator '<' we simply generate (lhs.compareTo(rhs) < 0)'