T - Target typeD - Delegation typepublic static interface Delegation.Builder<T,D>
toString() method of the 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
toString() function 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 - The class to view the delegate as (non-null)Delegation.Builder<T,D> toStringFunction(Function<? super D,String> toStringFunction)
toString() function the view should use.
The default view is Object.toString().
toStringFunction - The function to be applied to the delegate (non-null)T build()
This method finalizes the builder and returns the configured delegator.
Copyright © 2024. All rights reserved.