public abstract class Wrapper<T> extends Object
non-null delegate method.| Modifier | Constructor and Description |
|---|---|
protected |
Wrapper(T delegate)
Constructor providing a delegate wrapped object.
|
| Modifier and Type | Method and Description |
|---|---|
protected T |
delegate()
Delegate method that can be overridden in case the delegate is not yet available at construction time or when
there some strategy applicable that determines the delegate at runtime.
|
boolean |
equals(Object other) |
int |
hashCode() |
protected T |
nonNullDelegate()
Acessor to provide a guaranteed non-
null delegate instance for use within delegation method
implementations. |
String |
toString() |
protected Wrapper(T delegate)
delegate - The delegate object being wrapped.
This may only be null if the delegate() method is
overridden to provide an alternative non-null result.protected T delegate()
By default, the specified delegate value from the constructor is returned.
protected final T nonNullDelegate()
null delegate instance for use within delegation method
implementations.null).NullPointerException - with a specific message in case the delegate was null.Copyright © 2016–2017 Talsma ICT. All rights reserved.