public interface Disposable
dispose()
multiple times on a element. Dispose
is considered a state modifying action and must be called either within an
action where mutation is true or else it will start it's own transaction before
performing dispose. Once an element is disposed, no other methods should be invoked
on element.Modifier and Type | Method and Description |
---|---|
static Disposable |
asDisposable(java.lang.Object object)
Cast specified object to instance of Disposable.
|
void |
dispose()
Dispose the element.
|
static void |
dispose(java.lang.Object object)
Dispose the supplied object if it is Disposable, else do nothing.
|
boolean |
isDisposed()
Return true if dispose() has been called on object.
|
static boolean |
isDisposed(java.lang.Object object)
Return true if the parameter is Disposable and has been disposed, else return false.
|
void dispose()
Disposable
for a description of the implications.boolean isDisposed()
static void dispose(@Nonnull java.lang.Object object)
object
- the object to dispose.static boolean isDisposed(@Nonnull java.lang.Object object)
object
- the object to check disposed state.@Nonnull static Disposable asDisposable(@Nonnull java.lang.Object object)
object
- the object to cast to Disposable.