org.kuali.rice.krms.framework.engine
Class ComparableTermBasedProposition<T>
java.lang.Object
org.kuali.rice.krms.framework.engine.ComparableTermBasedProposition<T>
- All Implemented Interfaces:
- Proposition
- Direct Known Subclasses:
- CollectionOfComparablesTermBasedProposition, StringTermBasedProposition
public class ComparableTermBasedProposition<T>
- extends Object
- implements Proposition
LOG
private static final ResultLogger LOG
operator
private final ComparisonOperator operator
term
private final Term term
expectedValue
private final T expectedValue
ComparableTermBasedProposition
public ComparableTermBasedProposition(ComparisonOperator operator,
Term term,
T expectedValue)
evaluate
public boolean evaluate(ExecutionEnvironment environment)
- Description copied from interface:
Proposition
- This method evaluates this proposition -- and in the case of
Propositions containing children,
those children as well -- and returns the boolean result;
- Specified by:
evaluate in interface Proposition
- Parameters:
environment - the ExecutionEnvironment that this Proposition is running in
- Returns:
- the boolean result of evaluation
- Throws:
TermResolutionException - if there is a problem resolving the Term- See Also:
Proposition.evaluate(org.kuali.rice.krms.api.engine.ExecutionEnvironment)
compare
protected boolean compare(Comparable<T> termValue)
- This method does the actual comparison of the term value w/ the expected value
- Parameters:
termValue -
- Returns:
- the boolean result of the comparison
getChildren
public List<Proposition> getChildren()
- Description copied from interface:
Proposition
- This method returns the
List of child Propositions that belong to this object.
If there are no children (e.g. for simple Proposition types), this must
return an empty List.
- Specified by:
getChildren in interface Proposition
- Returns:
- a
List containing any child Propositions that belong to this object. Must never return null.
isCompound
public boolean isCompound()
- Description copied from interface:
Proposition
- Indicates whether this
Proposition can have children.
- Specified by:
isCompound in interface Proposition
- Returns:
- true if this
Proposition can contain child Propositions.
getExpectedValue
protected T getExpectedValue()
- Returns:
- the expectedValue
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.