AutoCloseable
, ToCopyableBuilder<AttributeMap.Builder,AttributeMap>
, SdkAutoCloseable
A map from AttributeMap.Key<T>
to T
that ensures the values stored with a key matches the type associated with the key. This does not implement Map
because it has more strict typing requirements, but a Map
can be converted to an {code AttributeMap} via the type-unsafe AttributeMap
method. This can be used for storing configuration values (OptionKey.LOG_LEVEL
to Boolean.TRUE
), attaching arbitrary attributes to a request chain (RequestAttribute.CONFIGURATION
to ClientConfiguration
) or similar use-cases.Return true if the provided key is configured in this map. Useful for differentiating between whether the provided key was not configured in the map or if it is configured, but its value is null.
containsKey(Key)
.Merges two AttributeMaps into one. This object is given higher precedence then the attributes passed in as a parameter.
Parameters:lowerPrecedence
- Options to merge into 'this' AttributeMap object. Any attribute already specified in 'this' object will be left as is since it has higher precedence. Returns: New options with values merged.public void close()
Specified by:close
in interface AutoCloseable
Specified by: close
in interface SdkAutoCloseable
toString
in class Object
equals
in class Object
public int hashCode()
Overrides:hashCode
in class Object
Take this object and create a builder that contains all of the current property values of this object.
Specified by:toBuilder
in interface ToCopyableBuilder<AttributeMap.Builder,AttributeMap>
Returns: a builder for type TncG1vNJzZmirlKB7ornAs6anmaeoe6S7zGihmq6RZK6xtY6lmK2do6l8tLvFra6aqpVkrq6t2ailaJmnqMClt46uq6Kko2SOtcDRopmurJWCrrF6x62kpQ%3D%3D