Package io.opencensus.trace
Class AttributeValue.AttributeValueLong
- java.lang.Object
-
- io.opencensus.trace.AttributeValue
-
- io.opencensus.trace.AttributeValue.AttributeValueLong
-
- Direct Known Subclasses:
AutoValue_AttributeValue_AttributeValueLong
- Enclosing class:
- AttributeValue
@Immutable abstract static class AttributeValue.AttributeValueLong 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 AttributeValueLong()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) static AttributeValue
create(java.lang.Long longValue)
(package private) abstract java.lang.Long
getLongValue()
<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)
Applies a function to the underlying value.<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)
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.Long longValue)
-
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:AttributeValue
Applies a function to the underlying value. The function that is called depends on the value's type, which can beString
,Long
, orBoolean
.- Specified by:
match
in 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 thismatch
method was added to the API. SeeFunctions
for 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:AttributeValue
Applies a function to the underlying value. The function that is called depends on the value's type, which can beString
,Long
, orBoolean
.- Specified by:
match
in 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 thismatch
method was added to the API. SeeFunctions
for some common functions for handling unknown types.- Returns:
- the result of the function applied to the underlying value.
-
getLongValue
abstract java.lang.Long getLongValue()
-
-