com.deliveredtechnologies.rulebook.StandardDecision Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rulebook-core Show documentation
Show all versions of rulebook-core Show documentation
A simple and intuitive rules abstraction for Java
package com.deliveredtechnologies.rulebook;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Predicate;
/**
* StandardDecision is the standard implementation of {@link Decision}.
*/
@Deprecated
public class StandardDecision implements Decision {
private static Logger LOGGER = LoggerFactory.getLogger(StandardDecision.class);
private Rule _rule;
private Result _result = new Result<>();
public StandardDecision(Class factClazz, Class resultClazz) {
_rule = new StandardRule(factClazz);
}
/**
* This create() method is a convenience method to avoid using new and generic syntax.
*
* @param factType the type of object stored in facts for this Decision
* @param resultType the type of object stored in the Result
* @param the class type of the objects in the Facts used
* @param the class type of object stored in the Result
*
* @return a new instance of StandardDecision
*/
public static StandardDecision create(Class factType, Class resultType) {
return new StandardDecision(factType, resultType);
}
/**
* This create() method is another convenience method to create a non-type specific StandardDecision.
* @return a new instance of StandardDecision
*/
public static StandardDecision
© 2015 - 2025 Weber Informatics LLC | Privacy Policy