DataAttributeValue (API Reference)
Class DataAttributeValue
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 ClassesModifier and TypeClassDescriptionstatic enumSupported types of the data attribute values. -
Constructor Summary
ConstructorsConstructorDescriptionDataAttributeValue(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(String value) Creates a string data attribute value.DataAttributeValue(List<DataAttributeValue> value) Creates an aggregated data attribute value. -
Method Summary
Modifier and TypeMethodDescriptiongetArray()Gets the array value ornullif the type doesn't match.Returns a string representation of the contained value.Gets the boolean value ornullif the type doesn't match.Gets the double precision floating decimal value ornullif the type doesn't match.getFloat()Gets the single precision floating decimal value ornullif the type doesn't match.getInt64()Gets 64-bits integer value ornullif the type doesn't match.Gets the string value ornullif the type doesn't match.getType()Returns the type of the value.
-
Constructor Details
-
DataAttributeValue
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
Creates an aggregated data attribute value.
- Parameters:
value-Attribute value.
-
-
Method Details
-
getType
Returns the type of the value.
- Returns:
The type of the value.
-
getString
Gets the string value or
nullif the type doesn't match.- Returns:
Attribute value.
-
getInt64
Gets 64-bits integer value or
nullif the type doesn't match.- Returns:
Attribute value.
-
getFloat
Gets the single precision floating decimal value or
nullif the type doesn't match.- Returns:
Attribute value.
-
getDouble
Gets the double precision floating decimal value or
nullif the type doesn't match.- Returns:
Attribute value.
-
getBoolean
Gets the boolean value or
nullif the type doesn't match.- Returns:
Attribute value.
-
getArray
Gets the array value or
nullif the type doesn't match.- Returns:
Attribute value.
-
getAsString
Returns a string representation of the contained value.
- Returns:
Attribute value.
-