@ProviderType
public final class TypedValues
extends java.lang.Object
TypedValue| Modifier and Type | Method and Description |
|---|---|
static BooleanValue |
newBooleanValue(boolean value)
Creates new boolean value.
|
static ByteArrayValue |
newByteArrayValue(byte[] value)
Creates new byte array value.
|
static DoubleValue |
newDoubleValue(double value)
Creates new double value.
|
static FloatValue |
newFloatValue(float value)
Creates new float value.
|
static IntegerValue |
newIntegerValue(int value)
Creates new integer value.
|
static LongValue |
newLongValue(long value)
Creates new long value.
|
static StringValue |
newStringValue(java.lang.String value)
Creates new string value.
|
static TypedValue<?> |
newTypedValue(java.lang.Object value)
Creates new TypedValue inferring the type from the argument.
|
static TypedValue<?> |
parseTypedValue(DataType type,
java.lang.String value)
Parses a TypedValue of given type from a String.
|
public static BooleanValue newBooleanValue(boolean value)
value - the primitive boolean valueTypedValuepublic static ByteArrayValue newByteArrayValue(byte[] value)
value - the primitive byte array valueTypedValueKuraRuntimeException - if the argument is nullpublic static FloatValue newFloatValue(float value)
value - the primitive float valueTypedValuepublic static DoubleValue newDoubleValue(double value)
value - the primitive double valueTypedValuepublic static IntegerValue newIntegerValue(int value)
value - the primitive integer valueTypedValuepublic static LongValue newLongValue(long value)
value - the primitive long valueTypedValuepublic static StringValue newStringValue(@Nullable java.lang.String value)
value - the string value to be represented as TypedValueTypedValuepublic static TypedValue<?> newTypedValue(java.lang.Object value)
value - an object that needs to be represented as TypedValueTypedValue that represents the conversion of valuejava.lang.IllegalArgumentException - if value cannot be represented as TypedValuepublic static TypedValue<?> parseTypedValue(DataType type, java.lang.String value)
value - the String to be parsed into a TypedValuetype - the DataType of the returned TypedValueTypedValue that represents the conversion of valuejava.lang.IllegalArgumentException - if value cannot be represented as TypedValue