Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Proposition |
|
| 1.0;1 |
1 | package org.kuali.rice.krms.framework.engine; | |
2 | ||
3 | import java.util.List; | |
4 | ||
5 | import org.kuali.rice.krms.api.engine.Engine; | |
6 | import org.kuali.rice.krms.api.engine.ExecutionEnvironment; | |
7 | ||
8 | /** | |
9 | * Interface for logical propositions that may be executed in the {@link Engine}. | |
10 | * | |
11 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
12 | */ | |
13 | public interface Proposition { | |
14 | ||
15 | /** | |
16 | * This method evaluates this proposition -- and in the case of {@link Proposition}s containing children, | |
17 | * those children as well -- and returns the boolean result; | |
18 | * | |
19 | * @param environment the {@link ExecutionEnvironment} that this {@link Proposition} is running in | |
20 | * @return the boolean result of evaluation | |
21 | */ | |
22 | public boolean evaluate(ExecutionEnvironment environment); | |
23 | ||
24 | /** | |
25 | * This method returns the {@link List} of child {@link Proposition}s that belong to this object. | |
26 | * If there are no children (e.g. for simple {@link Proposition} types), this must | |
27 | * return an empty {@link List}. | |
28 | * | |
29 | * @return a {@link List} containing any child {@link Proposition}s that belong to this object. Must never return null. | |
30 | */ | |
31 | public List<Proposition> getChildren(); | |
32 | ||
33 | /** | |
34 | * Indicates whether this {@link Proposition} can have children. | |
35 | * @return true if this {@link Proposition} can contain child {@link Proposition}s. | |
36 | */ | |
37 | public boolean isCompound(); | |
38 | ||
39 | } |