io.github.vmzakharov.ecdataframe.dsl.PropertyPathExpr Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dataframe-ec Show documentation
Show all versions of dataframe-ec Show documentation
A tabular data structure based on the Eclipse Collections framework
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;
import org.eclipse.collections.api.list.ListIterable;
public record PropertyPathExpr(ListIterable pathElements)
implements Expression
{
@Override
public Value evaluate(ExpressionEvaluationVisitor visitor)
{
return visitor.visitPropertyPathExpr(this);
}
@Override
public void accept(ExpressionVisitor visitor)
{
visitor.visitPropertyPathExpr(this);
}
public String getEntityName()
{
return this.pathElements.getFirst();
}
public String getPropertyChainString()
{
return this.pathElements.drop(1).makeString(".");
}
}