package be.iminds.ilabt.jfed.highlevel.jobs;

import be.iminds.ilabt.jfed.experiment.Experiment;
import be.iminds.ilabt.jfed.experiment.ExperimentPart;

import javax.annotation.Nonnull;

/**
 * User: twalcari
 * Date: 1/13/2016
 * Time: 11:50
 */
public abstract class ExperimentPartStateSlice<EP extends ExperimentPart> extends StateSlice {

    protected final Experiment experiment;
    protected final EP experimentPart;

    public ExperimentPartStateSlice(@Nonnull Job<?> job,@Nonnull EP experimentPart) {
        super(job);
        this.experiment = experimentPart.getExperiment();
        this.experimentPart = experimentPart;
    }

    public EP getExperimentPart() {
        return experimentPart;
    }

    @Override
    public String getName() {
        return experimentPart.getName();
    }
}
