public class RPNExecutor
extends Object
Constructor and Description |
---|
RPNExecutor(RPNEngine engine,
TimeZone timeZone)
Constructs an instance.
|
Modifier and Type | Method and Description |
---|---|
PointValue |
execute(String source,
String[] macros,
String[] words,
ResultValue resultValue,
Logger logger)
Executes the program compiled from the source on the resultValue's
inputs.
|
static Optional<PointValue> |
returnResult(ResultValue resultValue,
Optional<PointValue> optionalPointValue)
Returns a result from a result value and a point value.
|
public RPNExecutor(@Nonnull RPNEngine engine, @Nonnull TimeZone timeZone)
engine
- The RPN engine.timeZone
- The time zone.@Nonnull @CheckReturnValue public static Optional<PointValue> returnResult(@Nonnull ResultValue resultValue, @Nonnull Optional<PointValue> optionalPointValue)
resultValue
- The result value.optionalPointValue
- The optional point value@Nullable @CheckReturnValue public PointValue execute(@Nonnull String source, @Nonnull String[] macros, @Nonnull String[] words, @Nonnull ResultValue resultValue, @Nonnull Logger logger)
source
- The source program.macros
- The macro instruction definitions.words
- The word definitions.resultValue
- The ResultValue.logger
- The Logger.Copyright © 2003-2019 Serge Brisson. All Rights Reserved.