Package com.android.ddmlib.log
Class EventValueDescription
- java.lang.Object
-
- com.android.ddmlib.log.EventValueDescription
-
public final class EventValueDescription extends java.lang.Object
Describes anEventContainer
value.This is a stand-alone object, not linked to a particular Event. It describes the value, by name, type (
EventContainer.EventValueType
), and (if needed) value unit (EventValueDescription.ValueType
).The index of the value is not contained within this class, and is instead dependent on the index of this particular object in the array of
EventValueDescription
returned byEventLogParser.getEventInfoMap()
when queried for a particular event tag.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EventValueDescription.ValueType
Represents the type of a numerical value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkForType(java.lang.Object value)
Checks if the value is of the proper type for this receiver.EventContainer.EventValueType
getEventValueType()
java.lang.String
getName()
java.lang.Object
getObjectFromString(java.lang.String value)
Returns an object of a valid type (based on the value returned bygetEventValueType()
) from a String value.EventValueDescription.ValueType
getValueType()
java.lang.String
toString()
-
-
-
Method Detail
-
getName
public java.lang.String getName()
- Returns:
- the Name.
-
getEventValueType
public EventContainer.EventValueType getEventValueType()
- Returns:
- the
EventContainer.EventValueType
.
-
getValueType
public EventValueDescription.ValueType getValueType()
- Returns:
- the
EventValueDescription.ValueType
.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
checkForType
public boolean checkForType(java.lang.Object value)
Checks if the value is of the proper type for this receiver.- Parameters:
value
- the value to check.- Returns:
- true if the value is of the proper type for this receiver.
-
getObjectFromString
public java.lang.Object getObjectFromString(java.lang.String value)
Returns an object of a valid type (based on the value returned bygetEventValueType()
) from a String value.IMPORTANT
EventContainer.EventValueType.LIST
andEventContainer.EventValueType.TREE
are not supported.- Parameters:
value
- the value of the object expressed as a string.- Returns:
- an object or null if the conversion could not be done.
-
-