com.deliveredtechnologies.rulebook.StandardRule 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 com.deliveredtechnologies.rulebook.util.ArrayUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static com.deliveredtechnologies.rulebook.RuleState.BREAK;
import static com.deliveredtechnologies.rulebook.RuleState.NEXT;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* StandardRule is a standard rule implementation that can be used with a {@link RuleBook}.
*/
@Deprecated
public class StandardRule implements Rule {
private static Logger LOGGER = LoggerFactory.getLogger(StandardRule.class);
private Class _factType;
private Optional> _nextRule = Optional.empty();
private FactMap _facts = new FactMap();
private Predicate> _test;
private List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy