|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.android.ddmlib.log.EventContainer
public class EventContainer
Represents an event and its data.
| Nested Class Summary | |
|---|---|
static class |
EventContainer.CompareMethod
Comparison method for testValue(int, Object, com.android.ddmlib.log.EventContainer.CompareMethod) |
static class |
EventContainer.EventValueType
Type for event data. |
| Field Summary | |
|---|---|
int |
mTag
|
int |
nsec
|
int |
pid
|
int |
sec
|
int |
tid
|
| Method Summary | |
|---|---|
java.lang.Integer |
getInt()
Returns the data as an int. |
java.lang.Long |
getLong()
Returns the data as a long. |
java.lang.String |
getString()
Returns the data as a String. |
EventContainer.EventValueType |
getType()
Returns the type of the data. |
EventContainer.EventValueType |
getType(java.lang.Object data)
Returns the type of an object. |
java.lang.Object |
getValue(int valueIndex)
Returns a value by index. |
double |
getValueAsDouble(int valueIndex)
Returns a value by index as a double. |
java.lang.String |
getValueAsString(int valueIndex)
Returns a value by index as a String. |
boolean |
testValue(int index,
java.lang.Object value,
EventContainer.CompareMethod compareMethod)
Checks that the index-th value of this event against a provided value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int mTag
public int pid
public int tid
public int sec
public int nsec
| Method Detail |
|---|
public final java.lang.Integer getInt()
throws InvalidTypeException
InvalidTypeException - if the data type is not EventContainer.EventValueType.INT.getType()
public final java.lang.Long getLong()
throws InvalidTypeException
InvalidTypeException - if the data type is not EventContainer.EventValueType.LONG.getType()
public final java.lang.String getString()
throws InvalidTypeException
InvalidTypeException - if the data type is not EventContainer.EventValueType.STRING.getType()public java.lang.Object getValue(int valueIndex)
valueIndex - the index of the value. If the data is not a list, this is ignored.
public double getValueAsDouble(int valueIndex)
throws InvalidTypeException
valueIndex - the index of the value. If the data is not a list, this is ignored.
InvalidTypeException - if the data type is not EventContainer.EventValueType.INT,
EventContainer.EventValueType.LONG, EventContainer.EventValueType.LIST, or if the item in the
list at index valueIndex is not of type EventContainer.EventValueType.INT or
EventContainer.EventValueType.LONG.getType()
public java.lang.String getValueAsString(int valueIndex)
throws InvalidTypeException
valueIndex - the index of the value. If the data is not a list, this is ignored.
InvalidTypeException - if the data type is not EventContainer.EventValueType.INT,
EventContainer.EventValueType.LONG, EventContainer.EventValueType.STRING, EventContainer.EventValueType.LIST,
or if the item in the list at index valueIndex is not of type
EventContainer.EventValueType.INT, EventContainer.EventValueType.LONG, or EventContainer.EventValueType.STRINGgetType()public EventContainer.EventValueType getType()
public final EventContainer.EventValueType getType(java.lang.Object data)
public boolean testValue(int index,
java.lang.Object value,
EventContainer.CompareMethod compareMethod)
throws InvalidTypeException
index-th value of this event against a provided value.
index - the index of the value to testvalue - the value to test againstcompareMethod - the method of testing
InvalidTypeException - in case of type mismatch between the value to test and the value
to test against, or if the compare method is incompatible with the type of the values.EventContainer.CompareMethod
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||