Package net.kyori.adventure.util
Interface InheritanceAwareMap.Builder<C,V>
- Type Parameters:
C
- the class typeV
- the value type
- All Superinterfaces:
AbstractBuilder<InheritanceAwareMap<C,
V>>
- Enclosing interface:
- InheritanceAwareMap<C,
V>
public static interface InheritanceAwareMap.Builder<C,V>
extends AbstractBuilder<InheritanceAwareMap<C,V>>
A builder for inheritance-aware maps.
- Since:
- 4.17.0
-
Method Summary
Modifier and TypeMethodDescription@NotNull InheritanceAwareMap.Builder<C,
V> Put another value in this map.@NotNull InheritanceAwareMap.Builder<C,
V> putAll
(@NotNull InheritanceAwareMap<? extends C, ? extends V> map) Put values from an existing inheritance-aware map into this map.@NotNull InheritanceAwareMap.Builder<C,
V> Remove a value in this map.@NotNull InheritanceAwareMap.Builder<C,
V> strict
(boolean strict) Set strict mode for this builder.Methods inherited from interface net.kyori.adventure.builder.AbstractBuilder
build
-
Method Details
-
strict
Set strict mode for this builder.If this builder has values from when it was not in strict mode, all previous values will be re-validated for any hierarchy ambiguities.
- Parameters:
strict
- whether to enable strict mode.- Returns:
- this builder
- Since:
- 4.17.0
-
put
@NotNull @NotNull InheritanceAwareMap.Builder<C,V> put(@NotNull @NotNull Class<? extends C> clazz, @NotNull V value) Put another value in this map.- Parameters:
clazz
- the class typevalue
- the value for the provided type and any subtypes- Returns:
- this builder
- Since:
- 4.17.0
-
remove
@NotNull @NotNull InheritanceAwareMap.Builder<C,V> remove(@NotNull @NotNull Class<? extends C> clazz) Remove a value in this map.- Parameters:
clazz
- the class type- Returns:
- this builder
- Since:
- 4.17.0
-
putAll
@NotNull @NotNull InheritanceAwareMap.Builder<C,V> putAll(@NotNull @NotNull InheritanceAwareMap<? extends C, ? extends V> map) Put values from an existing inheritance-aware map into this map.- Parameters:
map
- the existing map- Returns:
- this builder
- Since:
- 4.17.0
-