Package no.digipost.util
Class AttributesMap.Builder
java.lang.Object
no.digipost.util.AttributesMap.Builder
- Enclosing class:
AttributesMap
Builder to incrementally construct an immutable
AttributesMap.-
Method Summary
Modifier and TypeMethodDescriptionand(ViewableAsTuple<? extends SetsNamedValue<V>, V> attributeWithValue) Add an attribute coupled with a value.and(AttributesMap otherMap) Add all attributes from an existingAttributesMap.and(AttributesMap.Builder otherBuilder) Add all attributes from anotherAttributesMap.Builderand(SetsNamedValue<V> attribute, V value) Add an attribute with a value.build()
-
Method Details
-
and
public <V> AttributesMap.Builder and(ViewableAsTuple<? extends SetsNamedValue<V>, V> attributeWithValue) Add an attribute coupled with a value.- Parameters:
attributeWithValue- the attribute and the value.- Returns:
- the builder
-
and
Add an attribute with a value.- Parameters:
attribute- the attributevalue- the value to bind to the attribute- Returns:
- the builder
-
and
Add all attributes from an existingAttributesMap.- Parameters:
otherMap- contains the other attributes to add.- Returns:
- the builder
-
and
Add all attributes from anotherAttributesMap.Builder- Parameters:
otherBuilder- contains the other attributes to add- Returns:
- the builder
-
build
- Returns:
- a new immutable
AttributesMapcontaining the attributes and values added to the builder.
-