public class TypedValue extends Object
TypeDescriptor
that describes it.
The type descriptor can contain generic declarations that would not
be accessible through a simple getClass()
call on the object.Modifier and Type | Field and Description |
---|---|
static TypedValue |
NULL
TypedValue for null . |
Constructor and Description |
---|
TypedValue(Object value)
Create a
TypedValue for a simple object. |
TypedValue(Object value,
TypeDescriptor typeDescriptor)
Create a
TypedValue for a particular value with a particular
TypeDescriptor which may contain additional generic declarations. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
TypeDescriptor |
getTypeDescriptor() |
Object |
getValue() |
int |
hashCode() |
String |
toString() |
public static final TypedValue NULL
TypedValue
for null
.public TypedValue(@Nullable Object value)
TypedValue
for a simple object. The TypeDescriptor
is inferred from the object, so no generic declarations are preserved.value
- the object valuepublic TypedValue(@Nullable Object value, @Nullable TypeDescriptor typeDescriptor)
TypedValue
for a particular value with a particular
TypeDescriptor
which may contain additional generic declarations.value
- the object valuetypeDescriptor
- a type descriptor describing the type of the value@Nullable public TypeDescriptor getTypeDescriptor()