Klasse LazyCalculatedProperty<V>
java.lang.Object
ch.nolix.core.datastructure.property.LazyCalculatedProperty<V>
- Typparameter:
V- is the type of the value of aLazyCalculatedProperty.
- Alle implementierten Schnittstellen:
ILazyCalculatedProperty<V>,UpToDateRequestable
- Version:
- 2025-07-07
- Autor:
- Silvan Wyss
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic <V2> LazyCalculatedProperty<V2> forValueCreater(Supplier<V2> valueCreator) static <V2> LazyCalculatedProperty<V2> forValueCreaterAndNeedToUpdateSupplier(Supplier<V2> valueCreator, BooleanSupplier needToUpdateSupplier) booleanVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden ch.nolix.coreapi.state.staterequest.UpToDateRequestable
isOutOfDate
-
Methodendetails
-
forValueCreaterAndNeedToUpdateSupplier
public static <V2> LazyCalculatedProperty<V2> forValueCreaterAndNeedToUpdateSupplier(Supplier<V2> valueCreator, BooleanSupplier needToUpdateSupplier) - Typparameter:
V2- is the type of the value of the createdLazyCalculatedProperty.- Parameter:
valueCreator-needToUpdateSupplier-- Gibt zurück:
- a new
LazyCalculatedPropertywith the given valueCreator and needToUpdateSupplier. - Löst aus:
ArgumentIsNullException- if the given valueCreator is null.ArgumentIsNullException- if the given needToUpdateSupplier is null.
-
forValueCreater
- Typparameter:
V2- is the type of the value of the createdLazyCalculatedProperty.- Parameter:
valueCreator-- Gibt zurück:
- a new
LazyCalculatedPropertywith the given valueCreator. - Löst aus:
ArgumentIsNullException- if the given valueCreator is null.
-
getStoredValue
- Angegeben von:
getStoredValuein SchnittstelleILazyCalculatedProperty<V>- Gibt zurück:
- the lazy calculated value of the current
ILazyCalculatedProperty.
-
isUpToDate
public boolean isUpToDate()- Angegeben von:
isUpToDatein SchnittstelleUpToDateRequestable- Gibt zurück:
- true if the current
UpToDateRequestableis up-to-date, false otherwise.
-