gumbo.util
Class Disposables.DisposableImm

java.lang.Object
  |
  +--gumbo.util.Disposables.DisposableImm
All Implemented Interfaces:
Disposable, java.io.Serializable
Enclosing class:
Disposables

public static class Disposables.DisposableImm
extends java.lang.Object
implements Disposable, java.io.Serializable

A serializable immutable view wrapper for a target Disposable. All accessors, including identity, forward to the target. All mutators throw an UnsupportedOperationException.

See Also:
Serialized Form

Constructor Summary
Disposables.DisposableImm(Disposable target)
           
 
Method Summary
 void dispose()
          Disposes this object and its dependencies, making this object inactive and unusable.
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 boolean isDisposed()
          Returns whether or not this object has been disposed (dispose() has been previously called).
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Disposables.DisposableImm

public Disposables.DisposableImm(Disposable target)
Parameters:
target - Wrapped target. Never null.
Method Detail

dispose

public void dispose()
Description copied from interface: Disposable
Disposes this object and its dependencies, making this object inactive and unusable. Subsequent calls to this object's accessors should throw IllegalStateException. If the object is already disposed nothing happens.

Specified by:
dispose in interface Disposable

isDisposed

public boolean isDisposed()
Description copied from interface: Disposable
Returns whether or not this object has been disposed (dispose() has been previously called).

Specified by:
isDisposed in interface Disposable
Returns:
True if this object has been disposed.

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object