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

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

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

import org.eclipse.collections.api.list.ListIterable;
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.impl.factory.Lists;

/**
 * An abstract superclass for the {@code Script} hierarchy, adds behavior to keep track of the script's expressions
 * (statements)
 */
abstract public class AbstractScript
implements Script
{
    private final MutableList expressions = Lists.mutable.of();

    @Override
    public Expression addExpression(Expression anExpression)
    {
        this.expressions.add(anExpression);
        return anExpression;
    }

    @Override
    public ListIterable getExpressions()
    {
        return this.expressions;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy