The refactored Explanation looks great, however I see a couple of small issues worth raising.
1. The constructor is private and there is a protected toString(int depth) method, it doesn't look like anyone else is calling it and no-one can subclass it. Should this method be private?
2. The toString() output is different! ComplexExplanation had a slightly different getSummary() method:
return getValue() + " = "
+ (isMatch() ? "(MATCH) " : "(NON-MATCH) ")
return getValue() + " = " + getDescription();
I find this extra context invaluable, especially with the decoupling of score and match, we can't assume that a score of 0 is a NON-MATCH yet the output no longer tells is if an explanation is a MATCH or not.
I understand that I can roll my own string building code with the current API. It'd be great if the default output was as useful as possible.