Package net.kyori.adventure.builder
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.
A builder.
- Since:
- 4.10.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds.static <R,
B extends AbstractBuilder<R>>
RconfigureAndBuild
(B builder, @Nullable Consumer<? super B> consumer) Configuresbuilder
usingconsumer
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) Configuresbuilder
usingconsumer
and then builds.- Type Parameters:
R
- the type to be builtB
- the builder type- Parameters:
builder
- the builderconsumer
- the builder consume- Returns:
- the built thing
- Since:
- 4.10.0
-
build
Builds.- Returns:
- the built thing
- Since:
- 4.10.0
-