You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of v3.x, a fact is represented by Map.Entry<String, Object>. From a design point of view, this is a poor representation for a key domain concept like "fact". This design has a couple of drawbacks:
It is not type safe in regards to fact values
It is not convenient to iterate over a set facts
It is not easy/clean to enforce fact invariants (unique names, non null values, etc)
A Fact concept should be introduced to represent and encapsulate a named fact with its typed value:
public class Fact<T> {
private final String name;
private final T value;
}
The text was updated successfully, but these errors were encountered:
As of v3.x, a fact is represented by
Map.Entry<String, Object>
. From a design point of view, this is a poor representation for a key domain concept like "fact". This design has a couple of drawbacks:A
Fact
concept should be introduced to represent and encapsulate a named fact with its typed value:The text was updated successfully, but these errors were encountered: