Package net.kyori.adventure.util
Interface Buildable<R,B extends Buildable.Builder<R>>
-
- Type Parameters:
R
- the type that can be builtB
- the builder type
- All Known Subinterfaces:
BlockNBTComponent
,Book
,BuildableComponent<C,B>
,ComponentFlattener
,EntityNBTComponent
,JoinConfiguration
,KeybindComponent
,NBTComponent<C,B>
,Pointers
,ScoreComponent
,SelectorComponent
,StorageNBTComponent
,Style
,TextComponent
,TextReplacementConfig
,TranslatableComponent
public interface Buildable<R,B extends Buildable.Builder<R>>
Something that can be built.- Since:
- 4.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Buildable.Builder<R>
Deprecated.since 4.10.0, useAbstractBuilder
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description static <R extends Buildable<R,B>,B extends Buildable.Builder<R>>
RconfigureAndBuild(B builder, @Nullable java.util.function.Consumer<? super B> consumer)
Deprecated.since 4.10.0, useAbstractBuilder.configureAndBuild(AbstractBuilder, Consumer)
B
toBuilder()
Create a builder from this thing.
-
-
-
Method Detail
-
configureAndBuild
@Contract(mutates="param1") @Deprecated @NotNull static <R extends Buildable<R,B>,B extends Buildable.Builder<R>> R configureAndBuild(@NotNull B builder, @Nullable @Nullable java.util.function.Consumer<? super B> consumer)
Deprecated.since 4.10.0, useAbstractBuilder.configureAndBuild(AbstractBuilder, 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.0.0
-
toBuilder
@Contract(value="-> new", pure=true) @NotNull B toBuilder()
Create a builder from this thing.- Returns:
- a builder
- Since:
- 4.0.0
-
-