deliveredtechnologies / rulebook

100% Java, Lambda Enabled, Lightweight Rules Engine with a Simple and Intuitive DSL
http://www.deliveredtechnologies.com
Apache License 2.0
716 stars 124 forks source link

Deprecated classes/methods and non-compiling examples in README.md #201

Open bakoontz opened 3 years ago

bakoontz commented 3 years ago

There are a number of deprecated warnings when using the examples in the README. For instance, RuleBook<Integer> is deprecated, as it getIntVal() and getDblVal(). Is there an updated set of examples somewhere, or should I simply ignore these warnings?

Also, code based on this example doesn't compile due to type incompatibilities:

public class ExampleSolution {
  public static void main(String[] args) {
    RuleBook homeLoanRateRuleBook = RuleBookBuilder.create(HomeLoanRateRuleBook.class).withResultType(Double.class)
      .withDefaultResult(4.5)
      .build();
bakoontz commented 3 years ago

It appears the compilation error has something to do with two RuleBook definitions in two different packages:

import com.deliveredtechnologies.rulebook.model.RuleBook; import com.deliveredtechnologies.rulebook.RuleBook;

Please consider clarifying this in the docs, or do it the right way and give the interface a slightly different name. Or maybe even remove the deprecated RuleBook implementation.