Interface Customizer<TOCUSTOMIZE>
public interface Customizer<TOCUSTOMIZE>
Customizes the parameterized class.
- Author:
- Ryan Baxter, Toshiaki Maki
-
Method Summary
Modifier and TypeMethodDescriptionvoid
customize
(TOCUSTOMIZE tocustomize) static <T,
K> Customizer<T> once
(Customizer<T> customizer, Function<? super T, ? extends K> keyMapper) Create a wrapped customizer that guarantees that thecustomize(Object)
method of the delegatedcustomizer
is called at most once per target.
-
Method Details
-
customize
-
once
static <T,K> Customizer<T> once(Customizer<T> customizer, Function<? super T, ? extends K> keyMapper) Create a wrapped customizer that guarantees that thecustomize(Object)
method of the delegatedcustomizer
is called at most once per target.- Type Parameters:
T
- the type of the target to customizeK
- the type of the identifier of the target- Parameters:
customizer
- a customizer to be delegatedkeyMapper
- a mapping function to produce the identifier of the target- Returns:
- a wrapped customizer
-