From 2d83f65ee3f0e5ecd543b46478046395260ebc0f Mon Sep 17 00:00:00 2001 From: Miroslav Pokorny Date: Tue, 18 Aug 2026 17:14:44 +1000 Subject: [PATCH] https://github.com/mP1/walkingkooka-currency/pull/185 CurrencyContext.currencyExchanges & currencyExchangeRate unimplement CurrencyExchangeRater - https://github.com/mP1/walkingkooka-currency/pull/185 - CurrencyContext.currencyExchanges & currencyExchangeRate unimplement CurrencyExchangeRater - https://github.com/mP1/walkingkooka-currency/pull/186 - CanCurrencyExchangeRate & CanCurrencyExchanges extracted CurrencyContext - https://github.com/mP1/walkingkooka-currency/pull/187 - CanCurrencyExchangeRateTesting.currencyExchangeRateAndCheck CanCurrencyExchangeRate was CurrencyContext FIX - https://github.com/mP1/walkingkooka-currency/pull/188 - CanCurrencyExchangesTesting.currencyExchangesAndCheck: CanCurrencyExchanges was CurrencyContext FIX - https://github.com/mP1/walkingkooka-currency/pull/189 - CanCurrencyExchangeRateTesting2 extends CanCurrencyExchangeRateTesting --- ...preadsheetExpressionEvaluationContext.java | 29 ++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/src/main/java/walkingkooka/spreadsheet/expression/function/SpreadsheetExpressionFunctionNumberValueSpreadsheetExpressionEvaluationContext.java b/src/main/java/walkingkooka/spreadsheet/expression/function/SpreadsheetExpressionFunctionNumberValueSpreadsheetExpressionEvaluationContext.java index 999e023..14c50c9 100644 --- a/src/main/java/walkingkooka/spreadsheet/expression/function/SpreadsheetExpressionFunctionNumberValueSpreadsheetExpressionEvaluationContext.java +++ b/src/main/java/walkingkooka/spreadsheet/expression/function/SpreadsheetExpressionFunctionNumberValueSpreadsheetExpressionEvaluationContext.java @@ -20,8 +20,7 @@ import walkingkooka.Binary; import walkingkooka.Either; import walkingkooka.convert.Converter; -import walkingkooka.currency.CurrencyExchangeRater; -import walkingkooka.currency.CurrencyExchangeRaterDelegator; +import walkingkooka.currency.CurrencyExchange; import walkingkooka.datetime.DateTimeContext; import walkingkooka.datetime.DateTimeContextDelegator; import walkingkooka.environment.EnvironmentContext; @@ -95,7 +94,6 @@ * that uses the provided decimal separator and group separator. */ final class SpreadsheetExpressionFunctionNumberValueSpreadsheetExpressionEvaluationContext implements SpreadsheetExpressionEvaluationContext, - CurrencyExchangeRaterDelegator, DateTimeContextDelegator, SpreadsheetEnvironmentContextDelegator, JsonNodeMarshallUnmarshallContextDelegator, @@ -511,6 +509,24 @@ public SpreadsheetEnvironmentContext spreadsheetEnvironmentContext() { return this.context; } + // CanCurrencyExchangeRate.......................................................................................... + + @Override + public Optional currencyExchangeRate(final CurrencyExchange currencyExchange, + final Optional dateTime) { + return this.context.currencyExchangeRate( + currencyExchange, + dateTime + ); + } + + // CanCurrencyExchanges............................................................................................. + + @Override + public Set currencyExchanges() { + return this.context.currencyExchanges(); + } + // FormHandlerContext............................................................................................... @Override @@ -538,13 +554,6 @@ public SpreadsheetValidatorContext validatorContext(final SpreadsheetValidationR return this.context.validatorContext(reference); } - // CurrencyExchangeRaterDelegator................................................................................... - - @Override - public CurrencyExchangeRater currencyExchangeRater() { - return this.context; - } - // DateTimeContextDelegator......................................................................................... @Override