Package net.kyori.adventure.pointer
Interface Pointers.Builder
- All Superinterfaces:
AbstractBuilder<Pointers>
,Buildable.Builder<Pointers>
- Enclosing interface:
- Pointers
public static interface Pointers.Builder
extends AbstractBuilder<Pointers>, Buildable.Builder<Pointers>
A builder of pointers.
- Since:
- 4.8.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescription<T> @NotNull Pointers.Builder
withDynamic
(@NotNull Pointer<T> pointer, @NotNull Supplier<@Nullable T> value) Adds a pointer with a dynamic value provided by a supplier.default <T> @NotNull Pointers.Builder
withStatic
(@NotNull Pointer<T> pointer, T value) Adds a pointer with a static, optional value.Methods inherited from interface net.kyori.adventure.util.Buildable.Builder
build
-
Method Details
-
withStatic
@Contract("_, _ -> this") @NotNull default <T> @NotNull Pointers.Builder withStatic(@NotNull @NotNull Pointer<T> pointer, @Nullable T value) Adds a pointer with a static, optional value.- Type Parameters:
T
- the type- Parameters:
pointer
- the pointervalue
- the optional value- Returns:
- this builder
- Since:
- 4.8.0
-
withDynamic
@Contract("_, _ -> this") @NotNull <T> @NotNull Pointers.Builder withDynamic(@NotNull @NotNull Pointer<T> pointer, @NotNull @NotNull Supplier<@Nullable T> value) Adds a pointer with a dynamic value provided by a supplier.- Type Parameters:
T
- the type- Parameters:
pointer
- the pointervalue
- the value supplier- Returns:
- this builder
- Since:
- 4.8.0
-