org.etlunit.feature.FeatureClassLocatorProxy Maven / Gradle / Ivy
package org.etlunit.feature;
import org.etlunit.ClassLocator;
import org.etlunit.parser.ETLTestClass;
import java.util.List;
public class FeatureClassLocatorProxy implements ClassLocator
{
private int currentFeature = 0;
private final FeatureProxyBase base;
public FeatureClassLocatorProxy(List features)
{
base = new FeatureProxyBase(features, new FeatureProxyBase.Getter()
{
@Override
public ClassLocator get(Feature f)
{
return f.getLocator();
}
});
}
@Override
public void reset()
{
currentFeature = 0;
for (ClassLocator locator : base.getList())
{
locator.reset();
}
}
@Override
public boolean hasNext()
{
while (currentFeature < base.getList().size())
{
ClassLocator locator = base.getList().get(currentFeature);
if (locator.hasNext())
{
return true;
}
currentFeature++;
}
return false;
}
@Override
public ETLTestClass next()
{
return base.getList().get(currentFeature).next();
}
@Override
public void remove()
{
throw new UnsupportedOperationException();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy