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
  • Constructor Details

    • AttributeValueDouble

      AttributeValueDouble()
  • Method Details

    • create

      static AttributeValue create(Double doubleValue)
    • 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: AttributeValue
      Applies a function to the underlying value. The function that is called depends on the value's type, which can be String, Long, or Boolean.
      Specified by:
      match in class AttributeValue
      Parameters:
      stringFunction - the function that should be applied if the value has type String.
      booleanFunction - the function that should be applied if the value has type Boolean.
      longFunction - the function that should be applied if the value has type Long.
      defaultFunction - the function that should be applied if the value has a type that was added after this match method was added to the API. See Functions 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 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: AttributeValue
      Applies a function to the underlying value. The function that is called depends on the value's type, which can be String, Long, or Boolean.
      Specified by:
      match in class AttributeValue
      Parameters:
      stringFunction - the function that should be applied if the value has type String.
      booleanFunction - the function that should be applied if the value has type Boolean.
      longFunction - the function that should be applied if the value has type Long.
      doubleFunction - the function that should be applied if the value has type Double.
      defaultFunction - the function that should be applied if the value has a type that was added after this match method was added to the API. See Functions for some common functions for handling unknown types.
      Returns:
      the result of the function applied to the underlying value.
    • getDoubleValue

      abstract Double getDoubleValue()