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

co.streamx.fluent.extree.expression.ConstantExpression Maven / Gradle / Ivy

The newest version!
package co.streamx.fluent.extree.expression;

import lombok.Getter;

/**
 * Represents an expression that has a constant value.
 * 
 * 
 */
@Getter
public final class ConstantExpression extends Expression {

    private final Object value;

    ConstantExpression(Class resultType, Object value) {
        super(ExpressionType.Constant, resultType);

        this.value = value;
    }

    @Override
    protected  T visit(ExpressionVisitor v) {
        return v.visit(this);
    }

    @Override
    public String toString() {
        Object value = getValue();
        return String.valueOf(value);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy