T - Target typeD - Delegation typepublic static interface Delegation.Builder<T,D>
Object.toString() method to the one of the
provided delegate.| Modifier and Type | Method and Description |
|---|---|
<N extends D> |
as(Class<N> type)
Specifies the type the delegate should be viewed as.
|
T |
build()
Creates and returns a new view of type T of the underlying delegate of type D
|
Delegation.Builder<T,D> |
toStringFunction(Function<? super D,String> toStringFunction)
Specifies the {@code tostring()) the view should use.
|
<N extends D> Delegation.Builder<N,D> as(Class<N> type)
The default view is Object.
N - the new type of how the delegate should be viewedtype - to view the delegate as (non-null)Delegation.Builder<T,D> toStringFunction(Function<? super D,String> toStringFunction)
tostring()) the view should use.
<p>
The default view is {@link Object#toString()} .toStringFunction - to be applied to the delegate (non-null)T build()
Copyright © 2023. All rights reserved.