@FunctionalInterface public interface Disposable
Call to the dispose method is/should be idempotent.
|Modifier and Type
|Interface and Description
Disposable container that allows updating/replacing its inner Disposable
atomically and with respect of disposing the container itself.
Implementations are required to make this method idempotent.
default boolean isDisposed()
Implementations are not required to track disposition and as such may never return true even when disposed. However, they MUST only return true when there's a guarantee the resource or task is disposed.