Class DataAttributeValue


  • public final class DataAttributeValue
    extends NativeBase

    Encapsulates a data attribute value. Supports basic types and arrays of basic types.

    Note: This is a beta release of this feature, so there could be a few bugs and unexpected behavior. Related APIs may change for new releases without a deprecation process.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  DataAttributeValue.ValueType
      Supported types of the data attribute values.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<DataAttributeValue> getArray()
      Gets the array value or null if the type doesn't match.
      java.lang.String getAsString()
      Returns a string representation of the contained value.
      java.lang.Boolean getBoolean()
      Gets the boolean value or null if the type doesn't match.
      java.lang.Double getDouble()
      Gets the double precision floating decimal value or null if the type doesn't match.
      java.lang.Float getFloat()
      Gets the single precision floating decimal value or null if the type doesn't match.
      java.lang.Long getInt64()
      Gets 64-bits integer value or null if the type doesn't match.
      java.lang.String getString()
      Gets the string value or null if the type doesn't match.
      DataAttributeValue.ValueType getType()
      Returns the type of the value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DataAttributeValue

        public DataAttributeValue​(@NonNull
                                  java.lang.String value)

        Creates a string data attribute value.

        Parameters:
        value -

        Attribute value.

      • DataAttributeValue

        public DataAttributeValue​(long value)

        Creates a 64-bit integer data attribute value.

        Parameters:
        value -

        Attribute value.

      • DataAttributeValue

        public DataAttributeValue​(float value)

        Creates a single precision floating decimal data attribute value.

        Parameters:
        value -

        Attribute value.

      • DataAttributeValue

        public DataAttributeValue​(double value)

        Creates a double precision floating decimal data attribute value.

        Parameters:
        value -

        Attribute value.

      • DataAttributeValue

        public DataAttributeValue​(boolean value)

        Creates a boolean data attribute value.

        Parameters:
        value -

        Attribute value.

      • DataAttributeValue

        public DataAttributeValue​(@NonNull
                                  java.util.List<DataAttributeValue> value)

        Creates an aggregated data attribute value.

        Parameters:
        value -

        Attribute value.

    • Method Detail

      • getString

        @Nullable
        public java.lang.String getString()

        Gets the string value or null if the type doesn't match.

        Returns:

        Attribute value.

      • getInt64

        @Nullable
        public java.lang.Long getInt64()

        Gets 64-bits integer value or null if the type doesn't match.

        Returns:

        Attribute value.

      • getFloat

        @Nullable
        public java.lang.Float getFloat()

        Gets the single precision floating decimal value or null if the type doesn't match.

        Returns:

        Attribute value.

      • getDouble

        @Nullable
        public java.lang.Double getDouble()

        Gets the double precision floating decimal value or null if the type doesn't match.

        Returns:

        Attribute value.

      • getBoolean

        @Nullable
        public java.lang.Boolean getBoolean()

        Gets the boolean value or null if the type doesn't match.

        Returns:

        Attribute value.

      • getArray

        @Nullable
        public java.util.List<DataAttributeValue> getArray()

        Gets the array value or null if the type doesn't match.

        Returns:

        Attribute value.

      • getAsString

        @NonNull
        public java.lang.String getAsString()

        Returns a string representation of the contained value.

        Returns:

        Attribute value.