Interface TypeMapBuilder<V>

Type Parameters:
V - The type of the values in the TypeMap.

public sealed interface TypeMapBuilder<V>
Defines an interface for building TypeMap instances. You obtain a concrete TypeMapBuilder through one of the static factory methods on the TypeMap interface.
See Also:
  • Method Details

    • autobox

      TypeMapBuilder<V> autobox(boolean autobox)
      Whether to enable autoboxing.
      Parameters:
      autobox - whether to enable "autoboxing"
      Returns:
      this Builder instance
    • add

      TypeMapBuilder<V> add(Class<?> type, V value)
      Associates the specified type with the specified value.
      Parameters:
      type - The type
      value - The value
      Returns:
      this Builder instance
    • addMultiple

      TypeMapBuilder<V> addMultiple(V value, Class<?>... types)
      Associates multiple types with the same value.
      Parameters:
      value - The value
      types - The types to associate the value with
      Returns:
      this Builder instance
    • freeze

      TypeMap<V> freeze()
      Returns a Map with the configured types and behaviour.
      Returns:
      a TypeMap with the configured types and behaviour