public static class Attributes.Builder
extends java.lang.Object
Attributes
instance with an arbitrary number of key-value
pairs.Modifier and Type | Method and Description |
---|---|
Attributes.Builder |
addAll(Attributes attributes)
Add all the provided attributes to this Builder.
|
Attributes |
build()
Create the
Attributes from this. |
<T> Attributes.Builder |
setAttribute(AttributeKey<java.lang.Long> key,
int value)
Sets a
AttributeKey with associated value into this. |
<T> Attributes.Builder |
setAttribute(AttributeKey<T> key,
T value)
Sets a
AttributeKey with associated value into this. |
Attributes.Builder |
setAttribute(java.lang.String key,
java.lang.Boolean... value)
Sets a Boolean array attribute into this.
|
Attributes.Builder |
setAttribute(java.lang.String key,
boolean value)
Sets a boolean attribute into this.
|
Attributes.Builder |
setAttribute(java.lang.String key,
java.lang.Double... value)
Sets a Double array attribute into this.
|
Attributes.Builder |
setAttribute(java.lang.String key,
double value)
Sets a double attribute into this.
|
Attributes.Builder |
setAttribute(java.lang.String key,
java.lang.Long... value)
Sets a Long array attribute into this.
|
Attributes.Builder |
setAttribute(java.lang.String key,
long value)
Sets a long attribute into this.
|
Attributes.Builder |
setAttribute(java.lang.String key,
java.lang.String... value)
Sets a String array attribute into this.
|
Attributes.Builder |
setAttribute(java.lang.String key,
java.lang.String value)
Sets a String attribute into this.
|
public Attributes build()
Attributes
from this.public <T> Attributes.Builder setAttribute(AttributeKey<java.lang.Long> key, int value)
AttributeKey
with associated value into this.public <T> Attributes.Builder setAttribute(AttributeKey<T> key, T value)
AttributeKey
with associated value into this.public Attributes.Builder setAttribute(java.lang.String key, java.lang.String value)
Note: It is strongly recommended to use setAttribute(AttributeKey, Object)
, and
pre-allocate your keys, if possible.
public Attributes.Builder setAttribute(java.lang.String key, long value)
Note: It is strongly recommended to use setAttribute(AttributeKey, Object)
, and
pre-allocate your keys, if possible.
public Attributes.Builder setAttribute(java.lang.String key, double value)
Note: It is strongly recommended to use setAttribute(AttributeKey, Object)
, and
pre-allocate your keys, if possible.
public Attributes.Builder setAttribute(java.lang.String key, boolean value)
Note: It is strongly recommended to use setAttribute(AttributeKey, Object)
, and
pre-allocate your keys, if possible.
public Attributes.Builder setAttribute(java.lang.String key, java.lang.String... value)
Note: It is strongly recommended to use setAttribute(AttributeKey, Object)
, and
pre-allocate your keys, if possible.
public Attributes.Builder setAttribute(java.lang.String key, java.lang.Long... value)
Note: It is strongly recommended to use setAttribute(AttributeKey, Object)
, and
pre-allocate your keys, if possible.
public Attributes.Builder setAttribute(java.lang.String key, java.lang.Double... value)
Note: It is strongly recommended to use setAttribute(AttributeKey, Object)
, and
pre-allocate your keys, if possible.
public Attributes.Builder setAttribute(java.lang.String key, java.lang.Boolean... value)
Note: It is strongly recommended to use setAttribute(AttributeKey, Object)
, and
pre-allocate your keys, if possible.
public Attributes.Builder addAll(Attributes attributes)