Class AttributeValue.AttributeValueBoolean
java.lang.Object
io.opencensus.trace.AttributeValue
io.opencensus.trace.AttributeValue.AttributeValueBoolean
- Direct Known Subclasses:
AutoValue_AttributeValue_AttributeValueBoolean
- Enclosing class:
AttributeValue
- Since:
- 0.5
-
Nested Class Summary
Nested classes/interfaces inherited from class AttributeValue
AttributeValue.AttributeValueBoolean, AttributeValue.AttributeValueDouble, AttributeValue.AttributeValueLong, AttributeValue.AttributeValueString -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static AttributeValue(package private) abstract Booleanfinal <T> Tmatch(Function<? super String, T> stringFunction, Function<? super Boolean, T> booleanFunction, Function<? super Long, T> longFunction, Function<? super Double, T> doubleFunction, Function<Object, T> defaultFunction) Applies a function to the underlying value.final <T> Tmatch(Function<? super String, T> stringFunction, Function<? super Boolean, T> booleanFunction, Function<? super Long, T> longFunction, Function<Object, T> defaultFunction) Applies a function to the underlying value.Methods inherited from class AttributeValue
booleanAttributeValue, doubleAttributeValue, longAttributeValue, stringAttributeValue
-
Constructor Details
-
AttributeValueBoolean
AttributeValueBoolean()
-
-
Method Details
-
create
-
match
public final <T> T match(Function<? super String, T> stringFunction, Function<? super Boolean, T> booleanFunction, Function<? super Long, T> longFunction, Function<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 String, T> stringFunction, Function<? super Boolean, T> booleanFunction, Function<? super Long, T> longFunction, Function<? super Double, T> doubleFunction, Function<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.
-
getBooleanValue
-