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

io.github.vmzakharov.ecdataframe.dsl.AliasExpr Maven / Gradle / Ivy

There is a newer version: 1.2.0
Show newest version
package io.github.vmzakharov.ecdataframe.dsl;

import io.github.vmzakharov.ecdataframe.dsl.value.Value;
import io.github.vmzakharov.ecdataframe.dsl.visitor.ExpressionEvaluationVisitor;
import io.github.vmzakharov.ecdataframe.dsl.visitor.ExpressionVisitor;

public class AliasExpr
implements Expression
{
    private String alias;
    private Expression expression;

    public AliasExpr(String newAlias, Expression newExpression)
    {
        this.alias = newAlias;
        this.expression = newExpression;
    }

    @Override
    public Value evaluate(ExpressionEvaluationVisitor evaluationVisitor)
    {
        return this.expression.evaluate(evaluationVisitor);
    }

    @Override
    public void accept(ExpressionVisitor visitor)
    {
        visitor.visitAliasExpr(this);
    }

    public String getAlias()
    {
        return this.alias;
    }

    public Expression getExpression()
    {
        return this.expression;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy