Class DataAttributeValue

java.lang.Object
com.here.NativeBase
com.here.sdk.mapview.datasource.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.

  • Constructor Details

    • DataAttributeValue

      public DataAttributeValue(@NonNull 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 List<DataAttributeValue> value)

      Creates an aggregated data attribute value.

      Parameters:
      value -

      Attribute value.

  • Method Details

    • getType

      @NonNull public DataAttributeValue.ValueType getType()

      Returns the type of the value.

      Returns:

      The type of the value.

    • getString

      @Nullable public String getString()

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

      Returns:

      Attribute value.

    • getInt64

      @Nullable public Long getInt64()

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

      Returns:

      Attribute value.

    • getFloat

      @Nullable public Float getFloat()

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

      Returns:

      Attribute value.

    • getDouble

      @Nullable public Double getDouble()

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

      Returns:

      Attribute value.

    • getBoolean

      @Nullable public Boolean getBoolean()

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

      Returns:

      Attribute value.

    • getArray

      @Nullable public List<DataAttributeValue> getArray()

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

      Returns:

      Attribute value.

    • getAsString

      @NonNull public String getAsString()

      Returns a string representation of the contained value.

      Returns:

      Attribute value.