com.greenpepper.extensions.fit.FitActionInterpreter Maven / Gradle / Ivy
package com.greenpepper.extensions.fit;
import com.greenpepper.Example;
import com.greenpepper.interpreter.flow.AbstractFlowInterpreter;
import com.greenpepper.reflect.Fixture;
import com.greenpepper.systemunderdevelopment.SystemUnderDevelopment;
import com.greenpepper.util.ExampleUtil;
/**
* FitActionInterpreter class.
*
* @author oaouattara
* @version $Id: $Id
*/
public class FitActionInterpreter extends AbstractFlowInterpreter
{
private SystemUnderDevelopment sud;
private FitActionRowSelector selector;
/**
* Constructor for FitActionInterpreter.
*
* @param sud a {@link com.greenpepper.systemunderdevelopment.SystemUnderDevelopment} object.
* @param fixture a {@link com.greenpepper.reflect.Fixture} object.
* @param timed a boolean.
*/
public FitActionInterpreter(SystemUnderDevelopment sud, Fixture fixture, boolean timed)
{
selector = new FitActionRowSelector(sud, fixture, timed);
setRowSelector(selector);
this.sud = sud;
}
/** {@inheritDoc} */
@Override
protected Example firstRowOf(Example next)
{
if(Fit.isAFitInterpreter(sud, ExampleUtil.contentOf(next.firstChild())))
return next.at( 0, 0 );
return next.at( 0, 1 );
}
/**
* getRowSelector.
*
* @return a {@link com.greenpepper.extensions.fit.FitActionRowSelector} object.
*/
protected FitActionRowSelector getRowSelector()
{
return selector;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy