Package io.opencensus.trace
Class AttributeValue.AttributeValueDouble
- java.lang.Object
-
- io.opencensus.trace.AttributeValue
-
- io.opencensus.trace.AttributeValue.AttributeValueDouble
-
- Direct Known Subclasses:
AutoValue_AttributeValue_AttributeValueDouble
- Enclosing class:
- AttributeValue
@Immutable abstract static class AttributeValue.AttributeValueDouble extends AttributeValue
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.opencensus.trace.AttributeValue
AttributeValue.AttributeValueBoolean, AttributeValue.AttributeValueDouble, AttributeValue.AttributeValueLong, AttributeValue.AttributeValueString
-
-
Constructor Summary
Constructors Constructor Description AttributeValueDouble()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) static AttributeValuecreate(java.lang.Double doubleValue)(package private) abstract java.lang.DoublegetDoubleValue()<T> Tmatch(Function<? super java.lang.String,T> stringFunction, Function<? super java.lang.Boolean,T> booleanFunction, Function<? super java.lang.Long,T> longFunction, Function<? super java.lang.Double,T> doubleFunction, Function<java.lang.Object,T> defaultFunction)Applies a function to the underlying value.<T> Tmatch(Function<? super java.lang.String,T> stringFunction, Function<? super java.lang.Boolean,T> booleanFunction, Function<? super java.lang.Long,T> longFunction, Function<java.lang.Object,T> defaultFunction)Applies a function to the underlying value.-
Methods inherited from class io.opencensus.trace.AttributeValue
booleanAttributeValue, doubleAttributeValue, longAttributeValue, stringAttributeValue
-
-
-
-
Method Detail
-
create
static AttributeValue create(java.lang.Double doubleValue)
-
match
public final <T> T match(Function<? super java.lang.String,T> stringFunction, Function<? super java.lang.Boolean,T> booleanFunction, Function<? super java.lang.Long,T> longFunction, Function<java.lang.Object,T> defaultFunction)
Description copied from class:AttributeValueApplies a function to the underlying value. The function that is called depends on the value's type, which can beString,Long, orBoolean.- Specified by:
matchin classAttributeValue- Parameters:
stringFunction- the function that should be applied if the value has typeString.booleanFunction- the function that should be applied if the value has typeBoolean.longFunction- the function that should be applied if the value has typeLong.defaultFunction- the function that should be applied if the value has a type that was added after thismatchmethod was added to the API. SeeFunctionsfor some common functions for handling unknown types.- Returns:
- the result of the function applied to the underlying value.
-
match
public final <T> T match(Function<? super java.lang.String,T> stringFunction, Function<? super java.lang.Boolean,T> booleanFunction, Function<? super java.lang.Long,T> longFunction, Function<? super java.lang.Double,T> doubleFunction, Function<java.lang.Object,T> defaultFunction)
Description copied from class:AttributeValueApplies a function to the underlying value. The function that is called depends on the value's type, which can beString,Long, orBoolean.- Specified by:
matchin classAttributeValue- Parameters:
stringFunction- the function that should be applied if the value has typeString.booleanFunction- the function that should be applied if the value has typeBoolean.longFunction- the function that should be applied if the value has typeLong.doubleFunction- the function that should be applied if the value has typeDouble.defaultFunction- the function that should be applied if the value has a type that was added after thismatchmethod was added to the API. SeeFunctionsfor some common functions for handling unknown types.- Returns:
- the result of the function applied to the underlying value.
-
getDoubleValue
abstract java.lang.Double getDoubleValue()
-
-