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.
@FunctionalInterface public interface AbstractBuilder<R>
A builder.- Since:
- 4.10.0
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description R
build()
Builds.static <R,B extends AbstractBuilder<R>>
RconfigureAndBuild(B builder, @Nullable java.util.function.Consumer<? super B> consumer)
Configuresbuilder
usingconsumer
and then builds.
-
-
-
Method Detail
-
configureAndBuild
@Contract(mutates="param1") @NotNull static <R,B extends AbstractBuilder<R>> R configureAndBuild(@NotNull B builder, @Nullable @Nullable java.util.function.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
@Contract(value="-> new", pure=true) @NotNull R build()
Builds.- Returns:
- the built thing
- Since:
- 4.10.0
-
-