All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.heliorm.impl.ValueExpressionPart Maven / Gradle / Ivy

The newest version!
package com.heliorm.impl;

import static java.lang.String.format;

/**
 * @param  Type of POJO
 * @param  Type of the field
 * @author gideon
 */
public final class ValueExpressionPart extends ExpressionPart {

    private final Operator operator;

    private final C value;

    ValueExpressionPart(FieldPart left, Operator op, C value) {
        super(Type.VALUE_EXPRESSION, left);
        this.operator = op;
        this.value = value;
    }

    public Operator getOperator() {
        return operator;
    }

    public C getValue() {
        return value;
    }

    @Override
    public String toString() {
        return format("%s '%s'", operator.name(), getValue());
    }

    public enum Operator {
        EQ, NOT_EQ, LT, LE, GT, GE, LIKE, NOT_LIKE
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy