Class ComparableTermBasedProposition<T>
java.lang.Object
org.kuali.rice.krms.framework.engine.ComparableTermBasedProposition<T>
- Type Parameters:
T-
- All Implemented Interfaces:
Proposition
- Direct Known Subclasses:
CollectionOfComparablesTermBasedProposition,StringTermBasedProposition
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Constructor Summary
ConstructorsConstructorDescriptionComparableTermBasedProposition(ComparisonOperator operator, org.kuali.rice.krms.api.engine.Term term, T expectedValue) Create a ComparableTermBasedProposition with the given values -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancompare(Comparable<T> termValue) Compares the term value w/ the expected valueevaluate(org.kuali.rice.krms.api.engine.ExecutionEnvironment environment) Evaluates this proposition -- and in the case ofPropositions containing children, those children as well -- and returns the boolean result;Returns an empty list.protected TReturns the expectedValuebooleanIndicates whether thisPropositioncan have children.toString()
-
Constructor Details
-
ComparableTermBasedProposition
public ComparableTermBasedProposition(ComparisonOperator operator, org.kuali.rice.krms.api.engine.Term term, T expectedValue) Create a ComparableTermBasedProposition with the given values- Parameters:
operator-ComparisonOperatorto set the operator toterm-Termto set the term toexpectedValue- to set the expectedValue to
-
-
Method Details
-
evaluate
Description copied from interface:PropositionEvaluates this proposition -- and in the case ofPropositions containing children, those children as well -- and returns the boolean result;- Specified by:
evaluatein interfaceProposition- Parameters:
environment- theExecutionEnvironmentthat thisPropositionis running in- Returns:
- the boolean result of evaluation
- Throws:
org.kuali.rice.krms.api.engine.TermResolutionException- if there is a problem resolving theTerm- See Also:
-
compare
Compares the term value w/ the expected value- Parameters:
termValue- Comparable which makes up theComparisonOperator.compare() left hand side object- Returns:
- the boolean result of the comparison
-
getChildren
Returns an empty list. Collections.emptyList() Returns theListof childPropositions that belong to this object. If there are no children (e.g. for simplePropositiontypes), this must return an emptyList.- Specified by:
getChildrenin interfaceProposition- Returns:
- an empty list. Collections.emptyList()
-
isCompound
public boolean isCompound()Description copied from interface:PropositionIndicates whether thisPropositioncan have children.- Specified by:
isCompoundin interfaceProposition- Returns:
- true if this
Propositioncan contain childPropositions.
-
getExpectedValue
Returns the expectedValue- Returns:
- the expectedValue
-
toString
-