Class DataAttributeValue
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDataAttributeValue.ValueTypeSupported types of the data attribute values.
-
Constructor Summary
Constructors Constructor Description DataAttributeValue(boolean value)Creates a boolean data attribute value.DataAttributeValue(double value)Creates a double precision floating decimal data attribute value.DataAttributeValue(float value)Creates a single precision floating decimal data attribute value.DataAttributeValue(long value)Creates a 64-bit integer data attribute value.DataAttributeValue(java.lang.String value)Creates a string data attribute value.DataAttributeValue(java.util.List<DataAttributeValue> value)Creates an aggregated data attribute value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<DataAttributeValue>getArray()Gets the array value ornullif the type doesn't match.java.lang.StringgetAsString()Returns a string representation of the contained value.java.lang.BooleangetBoolean()Gets the boolean value ornullif the type doesn't match.java.lang.DoublegetDouble()Gets the double precision floating decimal value ornullif the type doesn't match.java.lang.FloatgetFloat()Gets the single precision floating decimal value ornullif the type doesn't match.java.lang.LonggetInt64()Gets 64-bits integer value ornullif the type doesn't match.java.lang.StringgetString()Gets the string value ornullif the type doesn't match.DataAttributeValue.ValueTypegetType()Returns the type of the value.
-
-
-
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
-
getType
@NonNull public DataAttributeValue.ValueType getType()
Returns the type of the value.
- Returns:
The type of the value.
-
getString
@Nullable public java.lang.String getString()
Gets the string value or
nullif the type doesn't match.- Returns:
Attribute value.
-
getInt64
@Nullable public java.lang.Long getInt64()
Gets 64-bits integer value or
nullif the type doesn't match.- Returns:
Attribute value.
-
getFloat
@Nullable public java.lang.Float getFloat()
Gets the single precision floating decimal value or
nullif the type doesn't match.- Returns:
Attribute value.
-
getDouble
@Nullable public java.lang.Double getDouble()
Gets the double precision floating decimal value or
nullif the type doesn't match.- Returns:
Attribute value.
-
getBoolean
@Nullable public java.lang.Boolean getBoolean()
Gets the boolean value or
nullif the type doesn't match.- Returns:
Attribute value.
-
getArray
@Nullable public java.util.List<DataAttributeValue> getArray()
Gets the array value or
nullif 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.
-
-