rulebook icon indicating copy to clipboard operation
rulebook copied to clipboard

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

Open bakoontz opened this issue 4 years ago • 1 comments

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 avatar Nov 18 '20 22:11 bakoontz

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.

bakoontz avatar Nov 18 '20 22:11 bakoontz