Package io.opentelemetry.api.common
Class ArrayBackedAttributesBuilder
- java.lang.Object
-
- io.opentelemetry.api.common.ArrayBackedAttributesBuilder
-
- All Implemented Interfaces:
AttributesBuilder
class ArrayBackedAttributesBuilder extends java.lang.Object implements AttributesBuilder
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.lang.Object>data
-
Constructor Summary
Constructors Constructor Description ArrayBackedAttributesBuilder()ArrayBackedAttributesBuilder(java.util.List<java.lang.Object> data)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Attributesbuild()Create theAttributesfrom this.<T> AttributesBuilderput(AttributeKey<java.lang.Long> key, int value)Puts aAttributeKeywith associated value into this.<T> AttributesBuilderput(AttributeKey<T> key, T value)Puts aAttributeKeywith associated value into this.AttributesBuilderputAll(Attributes attributes)Puts all the provided attributes into this Builder.<T> AttributesBuilderremove(AttributeKey<T> key)AttributesBuilderremoveIf(java.util.function.Predicate<AttributeKey<?>> predicate)Remove all attributes that satisfy the given predicate.(package private) static java.util.List<java.lang.Boolean>toList(boolean... values)(package private) static java.util.List<java.lang.Double>toList(double... values)(package private) static java.util.List<java.lang.Long>toList(long... values)
-
-
-
Method Detail
-
build
public Attributes build()
Description copied from interface:AttributesBuilderCreate theAttributesfrom this.- Specified by:
buildin interfaceAttributesBuilder
-
put
public <T> AttributesBuilder put(AttributeKey<java.lang.Long> key, int value)
Description copied from interface:AttributesBuilderPuts aAttributeKeywith associated value into this.The type parameter is unused.
- Specified by:
putin interfaceAttributesBuilder
-
put
public <T> AttributesBuilder put(AttributeKey<T> key, T value)
Description copied from interface:AttributesBuilderPuts aAttributeKeywith associated value into this.- Specified by:
putin interfaceAttributesBuilder
-
putAll
public AttributesBuilder putAll(Attributes attributes)
Description copied from interface:AttributesBuilderPuts all the provided attributes into this Builder.- Specified by:
putAllin interfaceAttributesBuilder- Returns:
- this Builder
-
remove
public <T> AttributesBuilder remove(AttributeKey<T> key)
Description copied from interface:AttributesBuilder- Specified by:
removein interfaceAttributesBuilder- Returns:
- this Builder
-
removeIf
public AttributesBuilder removeIf(java.util.function.Predicate<AttributeKey<?>> predicate)
Description copied from interface:AttributesBuilderRemove all attributes that satisfy the given predicate. Errors or runtime exceptions thrown by the predicate are relayed to the caller.- Specified by:
removeIfin interfaceAttributesBuilder- Returns:
- this Builder
-
toList
static java.util.List<java.lang.Double> toList(double... values)
-
toList
static java.util.List<java.lang.Long> toList(long... values)
-
toList
static java.util.List<java.lang.Boolean> toList(boolean... values)
-
-