Class ActionResult
done()), or produced properties for the engine to
set on it (set(Map)). A language whose expressions compute values without side effects returns properties.
The engine sets the properties in the order of the map, after the action returns, with the engine's
OutputWriter. By default that is put on a Map output, and on
any other output the public setter whose parameter accepts the value, such as setInterestRate for
interestRate, converting it only as Java widens a primitive, when no setter takes it as it is, such as an
Integer for a setter taking a long; when no setter takes it so either, the rule's language is asked
to convert it for each setter's type, with ExpressionCompiler.convertOutput(Object, Class), so a language
whose numbers are doubles can set a setter taking an int with a whole Double. A property the writer
can't set fails the rule with a
RuleExecutionException, which listeners receive in
onError. In a run of an engine that fires every match, each firing rule's properties are set in turn, so a
later rule can overwrite an earlier one's.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ActionResultdone()Returns the result of an action that changed the output object itself, or changed nothing.booleaninthashCode()Returns the properties to set on the output object.static ActionResultReturns the result of an action that produced properties for the engine to set on the output object.toString()
-
Method Details
-
done
Returns the result of an action that changed the output object itself, or changed nothing.- Returns:
- The result, with no properties
-
set
Returns the result of an action that produced properties for the engine to set on the output object.- Parameters:
properties- The values by property name, in the order to set them; copied. Values can benull.- Returns:
- The result
- Throws:
NullPointerException- ifpropertiesor one of its names isnullIllegalArgumentException- if a name is empty
-
properties
Returns the properties to set on the output object.- Returns:
- The values by property name, in the order they're set; empty for
done(); unmodifiable
-
equals
-
hashCode
public int hashCode() -
toString
-