Interface ComponentRenderer<C>
-
- Type Parameters:
C
- the context type
- All Known Implementing Classes:
AbstractComponentRenderer
,TranslatableComponentRenderer
public interface ComponentRenderer<C>
A component renderer.- Since:
- 4.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <T> ComponentRenderer<T>
mapContext(Function<T,C> transformer)
Return aComponentRenderer
that takes a different context type.@NotNull Component
render(@NotNull Component component, C context)
Renders a component.
-
-
-
Method Detail
-
render
@NotNull @NotNull Component render(@NotNull @NotNull Component component, @NotNull C context)
Renders a component.- Parameters:
component
- the componentcontext
- the context- Returns:
- the rendered component
- Since:
- 4.0.0
-
mapContext
default <T> ComponentRenderer<T> mapContext(Function<T,C> transformer)
Return aComponentRenderer
that takes a different context type.- Type Parameters:
T
- transformation function- Parameters:
transformer
- context type transformer- Returns:
- mapping renderer
- Since:
- 4.0.0
-
-