Class AttributeValue.AttributeValueBoolean

java.lang.Object
io.opencensus.trace.AttributeValue
io.opencensus.trace.AttributeValue.AttributeValueBoolean
Direct Known Subclasses:
AutoValue_AttributeValue_AttributeValueBoolean
Enclosing class:
AttributeValue

@Immutable abstract static class AttributeValue.AttributeValueBoolean extends AttributeValue
  • Constructor Details

    • AttributeValueBoolean

      AttributeValueBoolean()
  • Method Details

    • create

      static AttributeValue create(Boolean booleanValue)
    • 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.
    • getBooleanValue

      abstract Boolean getBooleanValue()