![JAR search and dependency download from the Maven repository](/logo.png)
io.hyperfoil.core.builders.BaseStepBuilder Maven / Gradle / Ivy
package io.hyperfoil.core.builders;
import java.util.Objects;
import io.hyperfoil.api.config.BaseSequenceBuilder;
import io.hyperfoil.api.config.StepBuilder;
public abstract class BaseStepBuilder> implements StepBuilder {
private BaseSequenceBuilder parent;
public T addTo(BaseSequenceBuilder parent) {
if (this.parent != null) {
throw new UnsupportedOperationException("Cannot add builder " + getClass().getName() + " to another sequence!");
}
parent.stepBuilder(this);
this.parent = Objects.requireNonNull(parent);
@SuppressWarnings("unchecked")
T self = (T) this;
return self;
}
public BaseSequenceBuilder endStep() {
if (parent == null) {
throw new UnsupportedOperationException("Sequence for " + getClass().getName() + " was not set.");
}
return parent;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy