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

org.requirementsascode.FlowlessStep Maven / Gradle / Ivy

There is a newer version: 2.0
Show newest version
package org.requirementsascode;

import java.util.function.Predicate;

/**
 * A step that is not part of a flow (i.e. no flow definition in the model).
 * 
 * @author b_muth
 *
 */
public class FlowlessStep extends Step {
	FlowlessStep(String stepName, UseCase useCase, Condition optionalCondition) {
		super(stepName, useCase, optionalCondition);
	}

	@Override
	public Predicate getPredicate() {
		Predicate predicate = toPredicate(getConditionOrElseTrue());
		return predicate;
	}

	private Condition getConditionOrElseTrue() {
		Condition condition = getCondition().orElse(() -> true);
		return condition;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy