- Type Parameters:
V- The type of the values in theTypeMap.
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.-
Method Summary
Modifier and TypeMethodDescriptionAssociates the specified type with the specified value.addMultiple(V value, Class<?>... types) Associates multiple types with the same value.autobox(boolean autobox) Whether to enable autoboxing.freeze()Returns aMapwith the configured types and behaviour.
-
Method Details
-
autobox
Whether to enable autoboxing.- Parameters:
autobox- whether to enable "autoboxing"- Returns:
- this
Builderinstance
-
add
Associates the specified type with the specified value.- Parameters:
type- The typevalue- The value- Returns:
- this
Builderinstance
-
addMultiple
Associates multiple types with the same value.- Parameters:
value- The valuetypes- The types to associate the value with- Returns:
- this
Builderinstance
-
freeze
Returns aMapwith the configured types and behaviour.- Returns:
- a
TypeMapwith the configured types and behaviour
-