Package com.basistech.rosette.dm
Class MapAttribute.Builder<K,V extends BaseAttribute>
java.lang.Object
com.basistech.rosette.dm.BaseAttribute.Builder<MapAttribute<K,V>,MapAttribute.Builder<K,V>>
com.basistech.rosette.dm.MapAttribute.Builder<K,V>
- Enclosing class:
- MapAttribute<K,
V extends BaseAttribute>
public static class MapAttribute.Builder<K,V extends BaseAttribute>
extends BaseAttribute.Builder<MapAttribute<K,V>,MapAttribute.Builder<K,V>>
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder(Class<?> keyClass, Class<? extends BaseAttribute> valueClass) Constructs an empty builder. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Constructs an immutable map from the current state of the builder.protected MapAttribute.Builder<K,V> getThis()Adds one entry to the map.Specifies the complete map.Methods inherited from class com.basistech.rosette.dm.BaseAttribute.Builder
addAllToList, addAllToSet, buildExtendedProperties, extendedProperties, extendedProperty, nullOrList
-
Constructor Details
-
Builder
Constructs an empty builder.- Parameters:
keyClass- the class for the keys to be stored in the mapvalueClass- the class for the values to be stored in the map
-
-
Method Details
-
put
Adds one entry to the map.- Parameters:
key- the key to addvalue- the value to add- Returns:
- this
-
setItems
Specifies the complete map.- Parameters:
items- the entire map- Returns:
- this
-
build
Constructs an immutable map from the current state of the builder.- Returns:
- the new map
-
getThis
- Specified by:
getThisin classBaseAttribute.Builder<MapAttribute<K,V extends BaseAttribute>, MapAttribute.Builder<K, V extends BaseAttribute>>
-