com.android.ddmlib.log
Enum EventContainer.EventValueType

java.lang.Object
  extended by java.lang.Enum<EventContainer.EventValueType>
      extended by com.android.ddmlib.log.EventContainer.EventValueType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<EventContainer.EventValueType>
Enclosing class:
EventContainer

public static enum EventContainer.EventValueType
extends java.lang.Enum<EventContainer.EventValueType>

Type for event data.


Enum Constant Summary
INT
           
LIST
           
LONG
           
STRING
           
TREE
           
UNKNOWN
           
 
Method Summary
static java.lang.Object getObjectFromStorageString(java.lang.String value)
          Creates an Object from a storage string created with getStorageString(Object).
static java.lang.String getStorageString(java.lang.Object object)
          Returns a storage string for an Object of type supported by EventContainer.EventValueType.
 int getValue()
          Returns the integer value of the enum.
 java.lang.String toString()
           
static EventContainer.EventValueType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static EventContainer.EventValueType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UNKNOWN

public static final EventContainer.EventValueType UNKNOWN

INT

public static final EventContainer.EventValueType INT

LONG

public static final EventContainer.EventValueType LONG

STRING

public static final EventContainer.EventValueType STRING

LIST

public static final EventContainer.EventValueType LIST

TREE

public static final EventContainer.EventValueType TREE
Method Detail

values

public static EventContainer.EventValueType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (EventContainer.EventValueType c : EventContainer.EventValueType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static EventContainer.EventValueType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getStorageString

public static java.lang.String getStorageString(java.lang.Object object)
Returns a storage string for an Object of type supported by EventContainer.EventValueType.

Strings created by this method can be reloaded with getObjectFromStorageString(String).

NOTE: for now, only STRING, INT, and LONG are supported.

Parameters:
object - the object to "convert" into a storage string.
Returns:
a string storing the object and its type or null if the type was not recognized.

getObjectFromStorageString

public static java.lang.Object getObjectFromStorageString(java.lang.String value)
Creates an Object from a storage string created with getStorageString(Object).

Parameters:
value - the storage string
Returns:
an Object or null if the string or type were not recognized.

getValue

public int getValue()
Returns the integer value of the enum.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<EventContainer.EventValueType>