private <B extends BuildableComponent.Builder<?, ?>> void mergeStyle(final Component component, final B builder, final C context) { builder.mergeColor(component); builder.mergeDecorations(component); builder.clickEvent(component.clickEvent()); Optional.ofNullable(component.hoverEvent()).ifPresent(hoverEvent -> { builder.hoverEvent(new HoverEvent( hoverEvent.action(), this.render(hoverEvent.value(), context) )); }); }
private <B extends BuildableComponent.Builder<?, ?>> void mergeStyle(final Component component, final B builder, final C context) { builder.mergeColor(component); builder.mergeDecorations(component); builder.clickEvent(component.clickEvent()); Optional.ofNullable(component.hoverEvent()).ifPresent(hoverEvent -> { builder.hoverEvent(new HoverEvent( hoverEvent.action(), this.render(hoverEvent.value(), context) )); }); }
private <B extends BuildableComponent.Builder<?, ?>> void mergeStyle(final Component component, final B builder, final C context) { builder.mergeColor(component); builder.mergeDecorations(component); builder.clickEvent(component.clickEvent()); Optional.ofNullable(component.hoverEvent()).ifPresent(hoverEvent -> { builder.hoverEvent(new HoverEvent( hoverEvent.action(), this.render(hoverEvent.value(), context) )); }); }
/** * Merges styling from another component into this component. * * @param that the other component * @return this builder */ @SuppressWarnings("unchecked") default @NonNull B mergeStyle(final @NonNull Component that) { this.mergeColor(that); this.mergeDecorations(that); this.mergeEvents(that); return (B) this; }
/** * Merges styling from another component into this component. * * @param that the other component * @return this builder */ @SuppressWarnings("unchecked") default @NonNull B mergeStyle(final @NonNull Component that) { this.mergeColor(that); this.mergeDecorations(that); this.mergeEvents(that); return (B) this; }
/** * Merges styling from another component into this component. * * @param that the other component * @return this builder */ default @NonNull B mergeStyle(final @NonNull Component that) { this.mergeColor(that); this.mergeDecorations(that); this.mergeEvents(that); return (B) this; }