Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Proposition |
|
| 1.0;1 |
1 | /** | |
2 | * Copyright 2005-2011 The Kuali Foundation | |
3 | * | |
4 | * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.opensource.org/licenses/ecl2.php | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | */ | |
16 | package org.kuali.rice.krms.framework.engine; | |
17 | ||
18 | import java.util.List; | |
19 | ||
20 | import org.kuali.rice.krms.api.engine.Engine; | |
21 | import org.kuali.rice.krms.api.engine.ExecutionEnvironment; | |
22 | ||
23 | /** | |
24 | * Interface for logical propositions that may be executed in the {@link Engine}. | |
25 | * | |
26 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
27 | */ | |
28 | public interface Proposition { | |
29 | ||
30 | /** | |
31 | * This method evaluates this proposition -- and in the case of {@link Proposition}s containing children, | |
32 | * those children as well -- and returns the boolean result; | |
33 | * | |
34 | * @param environment the {@link ExecutionEnvironment} that this {@link Proposition} is running in | |
35 | * @return the boolean result of evaluation | |
36 | */ | |
37 | public PropositionResult evaluate(ExecutionEnvironment environment); | |
38 | ||
39 | /** | |
40 | * This method returns the {@link List} of child {@link Proposition}s that belong to this object. | |
41 | * If there are no children (e.g. for simple {@link Proposition} types), this must | |
42 | * return an empty {@link List}. | |
43 | * | |
44 | * @return a {@link List} containing any child {@link Proposition}s that belong to this object. Must never return null. | |
45 | */ | |
46 | public List<Proposition> getChildren(); | |
47 | ||
48 | /** | |
49 | * Indicates whether this {@link Proposition} can have children. | |
50 | * @return true if this {@link Proposition} can contain child {@link Proposition}s. | |
51 | */ | |
52 | public boolean isCompound(); | |
53 | ||
54 | } |