@Override
    public final boolean equals(Object o) {
       if (o == this) {
           return true;
       } else if (o instanceof TemplateExpression) {
           TemplateExpression<?> c = (TemplateExpression<?>) o;
           return c.getTemplate().equals(template)
               && c.getType().equals(getType())
               && c.getArgs().equals(args);

       } else {
           return false;
       }
    }
Default implementation of the {@link TemplateExpression} interface

@author tiwe

@param <T> expression type
querydsl-core/src/main/java/com/querydsl/core/types/TemplateExpressionImpl.java