Package org.comroid.mutatio.ref
Class OutdateableReference<T>
- java.lang.Object
-
- org.comroid.mutatio.ref.OutdateableReference<T>
-
- All Implemented Interfaces:
java.util.function.Supplier<T>,org.comroid.api.SelfDeclared<Reference<T>>,org.comroid.api.Specifiable<Reference<T>>,Reference<T>
- Direct Known Subclasses:
OutdateableReference.SettableOfSupplier
public class OutdateableReference<T> extends java.lang.Object implements Reference<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOutdateableReference.SettableOfSupplier<T>-
Nested classes/interfaces inherited from interface org.comroid.mutatio.ref.Reference
Reference.Settable<T>, Reference.Support
-
-
Constructor Summary
Constructors Constructor Description OutdateableReference()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tcompute(java.util.function.Supplier<T> supplier)Tget()booleanisOutdated()booleanoutdate()Tupdate(T newValue)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
isOutdated
public boolean isOutdated()
-
get
@Nullable public T get()
-
outdate
public boolean outdate()
- Returns:
- Whether the reference became outdated with this call.
-
-