public <T> Cases<T,Expression<T>> then(Expression<T> expr) {
        if (expr instanceof Predicate) {
            return (Cases) then((Predicate) expr);
        } else if (expr instanceof StringExpression) {
            return (Cases) then((StringExpression) expr);
        } else if (expr instanceof NumberExpression) {
            return then((NumberExpression) expr);
        } else if (expr instanceof DateExpression) {
            return then((DateExpression) expr);
        } else if (expr instanceof DateTimeExpression) {
            return then((DateTimeExpression) expr);
        } else if (expr instanceof TimeExpression) {
            return then((TimeExpression) expr);
        } else if (expr instanceof ComparableExpression) {
            return then((ComparableExpression) expr);
        } else {
            return thenSimple(expr);
        }
    }
{@code CaseForEqBuilder} enables the construction of typesafe case-when-then-else constructs
for equals-operations :
e.g.

<pre>{@code
QCustomer c = QCustomer.customer;
Expression<Integer> cases = c.annualSpending
    .when(1000l).then(1)
    .when(2000l).then(2)
    .when(5000l).then(3)
    .otherwise(4);
}</pre>

@author tiwe

@param <D>
querydsl-core/src/main/java/com/querydsl/core/types/dsl/CaseForEqBuilder.java