@Test void testBuilderApplyDeep() { final C c0 = this.builder() .append(Component.text("a", NamedTextColor.RED)) .append(Component.text("b", NamedTextColor.RED)) .applyDeep(builder -> builder.color(NamedTextColor.GREEN)) .build(); final List<Component> children = c0.children(); assertThat(children).hasSize(2); forEachTransformAndAssert(children, Component::color, color -> assertEquals(NamedTextColor.GREEN, color)); }
@Override public final @NonNull List<Component> children() { return this.children; }
AbstractComponent implements Component, Examinable { @Override public final @NonNull List<Component> children() { return this.children; } }
AbstractComponent implements Component, Examinable { @Override public final @NonNull List<Component> children() { return this.children; } protected  AbstractComponent(final @NonNull List<? extends ComponentLike> children, final @NonNull Style style); }
AbstractComponent implements Component, Examinable { @Override public final @NonNull List<Component> children() { return this.children; } protected  AbstractComponent(final @NonNull List<? extends ComponentLike> children, final @NonNull Style style); @Override final @NonNull List<Component> children(); @Override final @NonNull Style style(); @Override @NonNull Component replaceText(final @NonNull Pattern pattern, final @NonNull Function<TextComponent.Builder, @Nullable ComponentLike> replacement, final @NonNull IntFunction2<PatternReplacementResult> fn); @Override boolean equals(final @Nullable Object other); @Override int hashCode(); @Override @NonNull Stream<? extends ExaminableProperty> examinableProperties(); @Override String toString(); }
AbstractComponent implements Component, Examinable { @Override public final @NonNull List<Component> children() { return this.children; } protected  AbstractComponent(final @NonNull List<? extends ComponentLike> children, final @NonNull Style style); @Override final @NonNull List<Component> children(); @Override final @NonNull Style style(); @Override @NonNull Component replaceText(final @NonNull Pattern pattern, final @NonNull Function<TextComponent.Builder, @Nullable ComponentLike> replacement, final @NonNull IntFunction2<PatternReplacementResult> fn); @Override boolean equals(final @Nullable Object other); @Override int hashCode(); @Override @NonNull Stream<? extends ExaminableProperty> examinableProperties(); @Override String toString();  }