[awattar] rename now to pointInTime

Signed-off-by: Thomas Leber <thomas@tl-photography.at>
This commit is contained in:
Thomas Leber 2024-12-07 11:25:13 +01:00
parent 71b17c018e
commit 11f60da2d6
3 changed files with 6 additions and 6 deletions

View File

@ -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.

View File

@ -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) {

View File

@ -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