Class DataAttributes

java.lang.Object
com.here.NativeBase
com.here.sdk.mapview.datasource.DataAttributes
All Implemented Interfaces:
DataAttributesBase

public final class DataAttributes extends NativeBase implements DataAttributesBase

Data attributes collection.

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.

  • Method Details

    • getAttributeNames

      @NonNull public List<String> getAttributeNames()

      Returns a list of attribute names.

      Specified by:
      getAttributeNames in interface DataAttributesBase
      Returns:

      The list of attribute names.

    • getValueType

      @Nullable public DataAttributeValue.ValueType getValueType(@NonNull String name)

      Returns the value type of an attribute or null if it is not contained.

      Specified by:
      getValueType in interface DataAttributesBase
      Parameters:
      name -

      Attribute name.

      Returns:

      Attribute value type or null if it is not contained.

    • getAsString

      @Nullable public String getAsString(@NonNull String name)

      Gets the value of an attribute as a string or null if it is not contained.

      Specified by:
      getAsString in interface DataAttributesBase
      Parameters:
      name -

      Attribute name.

      Returns:

      Attribute value.

    • getString

      @Nullable public String getString(@NonNull String name)

      Gets the value of a string attribute or null if it is not contained or the type doesn't match.

      Specified by:
      getString in interface DataAttributesBase
      Parameters:
      name -

      Attribute name.

      Returns:

      Attribute value.

    • getInt64

      @Nullable public Long getInt64(@NonNull String name)

      Gets the value of a 64-bits integer attribute or null if it is not contained or the type doesn't match.

      Specified by:
      getInt64 in interface DataAttributesBase
      Parameters:
      name -

      Attribute name.

      Returns:

      Attribute value.

    • getFloat

      @Nullable public Float getFloat(@NonNull String name)

      Gets the value of a single precision floating decimal attribute or null if it is not contained or the type doesn't match.

      Specified by:
      getFloat in interface DataAttributesBase
      Parameters:
      name -

      Attribute name.

      Returns:

      Attribute value.

    • getDouble

      @Nullable public Double getDouble(@NonNull String name)

      Gets the value of a double precision floating decimal attribute or null if it is not contained or the type doesn't match.

      Specified by:
      getDouble in interface DataAttributesBase
      Parameters:
      name -

      Attribute name.

      Returns:

      Attribute value.

    • getBoolean

      @Nullable public Boolean getBoolean(@NonNull String name)

      Gets the value of a boolean attribute or null if it is not contained or the type doesn't match.

      Specified by:
      getBoolean in interface DataAttributesBase
      Parameters:
      name -

      Attribute name.

      Returns:

      Attribute value.

    • getValue

      @Nullable public DataAttributeValue getValue(@NonNull String name)

      Gets the DataAttributeValue or null if it is not contained.

      Specified by:
      getValue in interface DataAttributesBase
      Parameters:
      name -

      Attribute name.

      Returns:

      Attribute value.