public class TypedValue extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TypedValue.DataType
Denotes the data types that a setting value can have.
|
Constructor and Description |
---|
TypedValue() |
TypedValue(TypedValue original)
Create a new TypedValue by copying an existing TypedValue
|
Modifier and Type | Method and Description |
---|---|
TypedValue.DataType |
getType()
Returns the data type.
|
Object |
getTypedValue()
Return the value as the data type specified.
|
String |
getValue()
Returns the value.
|
TypedValue |
setType(TypedValue.DataType type)
Sets the data type.
|
TypedValue |
setValue(String value)
Sets the value to set.
|
String |
toCompactString()
Returns a compact string representation of the object in XML format.
|
String |
toJsonCompactString()
Returns a compact string representation of the object in JSON format.
|
String |
toJsonString()
Returns a string representation of the object in JSON format.
|
String |
toString()
Returns a string representation of the object in XML format.
|
String |
toXmlCompactString()
Returns a compact string representation of the object in XML format.
|
String |
toXmlString()
Returns a string representation of the object in XML format.
|
public TypedValue()
public TypedValue(TypedValue original)
original
- the existing TypedValue to be copiedpublic TypedValue.DataType getType()
public String getValue()
public Object getTypedValue()
public TypedValue setType(TypedValue.DataType type)
type
- the data typepublic TypedValue setValue(String value)
value
- the value to setpublic String toXmlCompactString()
public String toXmlString()
public String toJsonCompactString()
public String toJsonString()
public String toCompactString()