Interface InheritanceAwareMap.Builder<C,V>

Type Parameters:
C - the class type
V - 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 Details

    • strict

      @NotNull @NotNull InheritanceAwareMap.Builder<C,V> strict(boolean 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 type
      value - 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