From 11f60da2d6ca12c719db623b1649e0a5cc3d8ea1 Mon Sep 17 00:00:00 2001 From: Thomas Leber Date: Sat, 7 Dec 2024 11:25:13 +0100 Subject: [PATCH] [awattar] rename now to pointInTime Signed-off-by: Thomas Leber --- .../binding/awattar/internal/AwattarBestPriceResult.java | 4 ++-- .../awattar/internal/AwattarConsecutiveBestPriceResult.java | 4 ++-- .../internal/AwattarNonConsecutiveBestPriceResult.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/AwattarBestPriceResult.java b/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/AwattarBestPriceResult.java index 88942156fa1..c0d06e73b38 100644 --- a/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/AwattarBestPriceResult.java +++ b/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/AwattarBestPriceResult.java @@ -52,10 +52,10 @@ public abstract class AwattarBestPriceResult { /** * Returns true if the best price is active. * - * @param now the current time + * @param pointInTime the current time * @return true if the best price is active, false otherwise */ - public abstract boolean isActive(Instant now); + public abstract boolean isActive(Instant pointInTime); /** * Returns the hours of the best price. diff --git a/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/AwattarConsecutiveBestPriceResult.java b/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/AwattarConsecutiveBestPriceResult.java index 0696cbb2689..b3f67f94e72 100644 --- a/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/AwattarConsecutiveBestPriceResult.java +++ b/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/AwattarConsecutiveBestPriceResult.java @@ -76,8 +76,8 @@ public class AwattarConsecutiveBestPriceResult extends AwattarBestPriceResult { } @Override - public boolean isActive(Instant now) { - return contains(now.toEpochMilli()); + public boolean isActive(Instant pointInTime) { + return contains(pointInTime.toEpochMilli()); } public boolean contains(long timestamp) { diff --git a/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/AwattarNonConsecutiveBestPriceResult.java b/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/AwattarNonConsecutiveBestPriceResult.java index ef9e56c9e30..09f09db9c0d 100644 --- a/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/AwattarNonConsecutiveBestPriceResult.java +++ b/bundles/org.openhab.binding.awattar/src/main/java/org/openhab/binding/awattar/internal/AwattarNonConsecutiveBestPriceResult.java @@ -64,8 +64,8 @@ public class AwattarNonConsecutiveBestPriceResult extends AwattarBestPriceResult } @Override - public boolean isActive(Instant now) { - return members.stream().anyMatch(x -> x.timerange().contains(now.toEpochMilli())); + public boolean isActive(Instant pointInTime) { + return members.stream().anyMatch(x -> x.timerange().contains(pointInTime.toEpochMilli())); } @Override