Interface AbstractBuilder<R>

Type Parameters:
R - the type to be built
All Known Subinterfaces:
BlockNBTComponent.Builder, Book.Builder, Buildable.Builder<R>, ClickCallback.Options.Builder, ComponentBuilder<C,B>, ComponentFlattener.Builder, EntityNBTComponent.Builder, InheritanceAwareMap.Builder<C,V>, JoinConfiguration.Builder, KeybindComponent.Builder, NBTComponentBuilder<C,B>, Pointers.Builder, PointersSupplier.Builder<T>, ResourcePackInfo.Builder, ResourcePackRequest.Builder, ScoreComponent.Builder, SelectorComponent.Builder, Sound.Builder, StorageNBTComponent.Builder, Style.Builder, TextComponent.Builder, TextReplacementConfig.Builder, TranslatableComponent.Builder
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface AbstractBuilder<R>
A builder.
Since:
4.10.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Builds.
    static <R, B extends AbstractBuilder<R>>
    R
    configureAndBuild(B builder, @Nullable Consumer<? super B> consumer)
    Configures builder using consumer and then builds.
  • Method Details

    • configureAndBuild

      @Contract(mutates="param1") @NotNull static <R, B extends AbstractBuilder<R>> R configureAndBuild(@NotNull B builder, @Nullable @Nullable Consumer<? super B> consumer)
      Configures builder using consumer and then builds.
      Type Parameters:
      R - the type to be built
      B - the builder type
      Parameters:
      builder - the builder
      consumer - the builder consume
      Returns:
      the built thing
      Since:
      4.10.0
    • build

      @Contract(value="-> new", pure=true) @NotNull R build()
      Builds.
      Returns:
      the built thing
      Since:
      4.10.0