com.android.ddmlib.log
Class EventValueDescription

java.lang.Object
  extended by com.android.ddmlib.log.EventValueDescription

public final class EventValueDescription
extends java.lang.Object

Describes an EventContainer 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 by EventLogParser.getEventInfoMap() when queried for a particular event tag.


Nested Class Summary
static class EventValueDescription.ValueType
          Represents the type of a numerical value.
 
Method Summary
 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 by getEventValueType()) from a String value.
 EventValueDescription.ValueType getValueType()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 class java.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 by getEventValueType()) from a String value.

IMPORTANT EventContainer.EventValueType.LIST and EventContainer.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.