|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Fact
A fact is a "piece" of the state of the world. For example when the application generates an event like "Ship #29384 moved from (183.23, 330.19) to (187.94, 334.82) at 22:43 26/07/2015", it may also generate a fact like "Ship #29384 is in (187.94, 334.82)".
Contrary to events, facts are never sent to the application. They are kept
indefinitely by the library. However, when a fact is provided by the library
to the application in the context of an hypothesis generation, by the method
generate(Set
the fact is deleted from the library. Even so, it can be restated by the
application by including it in the
GeneratedHypothesis.
1. Facts should never be changed, after their creation. This can be enforced if all fields are final, or all fields are private and only getter methods are available.
2. Facts MUST implement the hashCode and
the equals methods.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||