Package no.digipost.util
Class AttributesMap.Builder
- java.lang.Object
-
- no.digipost.util.AttributesMap.Builder
-
- Enclosing class:
- AttributesMap
public static class AttributesMap.Builder extends Object
Builder to incrementally construct an immutableAttributesMap.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <V> AttributesMap.Builderand(ViewableAsTuple<? extends SetsNamedValue<V>,V> attributeWithValue)Add an attribute coupled with a value.AttributesMap.Builderand(AttributesMap otherMap)Add all attributes from an existingAttributesMap.AttributesMap.Builderand(AttributesMap.Builder otherBuilder)Add all attributes from anotherAttributesMap.Builder<V> AttributesMap.Builderand(SetsNamedValue<V> attribute, V value)Add an attribute with a value.AttributesMapbuild()
-
-
-
Method Detail
-
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
public <V> AttributesMap.Builder and(SetsNamedValue<V> attribute, V value)
Add an attribute with a value.- Parameters:
attribute- the attributevalue- the value to bind to the attribute- Returns:
- the builder
-
and
public AttributesMap.Builder and(AttributesMap otherMap)
Add all attributes from an existingAttributesMap.- Parameters:
otherMap- contains the other attributes to add.- Returns:
- the builder
-
and
public AttributesMap.Builder and(AttributesMap.Builder otherBuilder)
Add all attributes from anotherAttributesMap.Builder- Parameters:
otherBuilder- contains the other attributes to add- Returns:
- the builder
-
build
public AttributesMap build()
- Returns:
- a new immutable
AttributesMapcontaining the attributes and values added to the builder.
-
-