Package net.kyori.adventure.util
Interface Buildable<R,B extends Buildable.Builder<R>>
- Type Parameters:
- R- the type that can be built
- B- the builder type
- All Known Subinterfaces:
- BlockNBTComponent,- Book,- BuildableComponent<C,B>,- EntityNBTComponent,- KeybindComponent,- NBTComponent<C,B>,- 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 SummaryNested Classes Modifier and Type Interface Description static interfaceBuildable.Builder<R>A builder.
- 
Method SummaryModifier and Type Method Description static <R extends Buildable<R, B>, B extends Buildable.Builder<R>>
 @NonNull RconfigureAndBuild(@NonNull B builder, @Nullable Consumer<? super B> consumer)Configuresbuilderusingconsumerand then builds.@NonNull BtoBuilder()Create a builder from this thing.
- 
Method Details- 
configureAndBuildstatic <R extends Buildable<R, B>, B extends Buildable.Builder<R>> @NonNull R configureAndBuild(@NonNull B builder, @Nullable Consumer<? super B> consumer)Configuresbuilderusingconsumerand 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.0.0
 
- 
toBuilder@NonNull B toBuilder()Create a builder from this thing.- Returns:
- a builder
- Since:
- 4.0.0
 
 
-