Package org.comroid.mutatio.ref
Class OutdateableReference.SettableOfSupplier<T>
- java.lang.Object
-
- org.comroid.mutatio.ref.OutdateableReference<T>
-
- org.comroid.mutatio.ref.OutdateableReference.SettableOfSupplier<T>
-
- All Implemented Interfaces:
java.util.function.Supplier<T>,org.comroid.api.SelfDeclared<Reference<T>>,org.comroid.api.Specifiable<Reference<T>>,Reference<T>,Reference.Settable<T>
- Enclosing class:
- OutdateableReference<T>
public static class OutdateableReference.SettableOfSupplier<T> extends OutdateableReference<T> implements Reference.Settable<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.comroid.mutatio.ref.OutdateableReference
OutdateableReference.SettableOfSupplier<T>
-
Nested classes/interfaces inherited from interface org.comroid.mutatio.ref.Reference
Reference.Settable<T>, Reference.Support
-
-
Constructor Summary
Constructors Constructor Description SettableOfSupplier(java.util.function.Supplier<T> supplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tget()booleanoutdate()Tset(T newValue)-
Methods inherited from class org.comroid.mutatio.ref.OutdateableReference
compute, isOutdated, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.comroid.mutatio.ref.Reference
into, invocable, isNull, orElse, orElseGet, process, provider, requireNonNull, requireNonNull, stream, test, wrap
-
Methods inherited from interface org.comroid.mutatio.ref.Reference.Settable
compute, computeIfAbsent, computeIfPresent
-
-
-
-
Constructor Detail
-
SettableOfSupplier
public SettableOfSupplier(java.util.function.Supplier<T> supplier)
-
-
Method Detail
-
get
@Nullable public T get()
-
set
@Nullable public T set(T newValue)
- Specified by:
setin interfaceReference.Settable<T>- Parameters:
newValue- The new value- Returns:
- The previous value
-
outdate
public boolean outdate()
- Overrides:
outdatein classOutdateableReference<T>- Returns:
- Whether the reference became outdated with this call.
-
-