Last
Holder of a value that is computed in time.
Example usage is in automatic registering and unregistering of listeners.
Imagine a hypothetical API: - registerListener(Consumercallback) - unregisterListener(Consumer
Wrapping this type of API into a Lastis trivial:
Last.of(acceptor -> { Consumercallback = acceptor::onValue; acceptor.onDisposed(() -> api.unregisterListener(callback)); api.registerListener(callback); }, () -> "initial value");
Inheritors
Constructors
Functions
Link copied to clipboard
Constructs and empty disposable that is already disposed.
Link copied to clipboard
Construct a
Disposable by wrapping a Runnable that is executed exactly once when the Disposable is disposed.Link copied to clipboard
Returns true if this resource has been disposed.
Link copied to clipboard