com.android.ddmlib.log
Enum EventValueDescription.ValueType

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

public static enum EventValueDescription.ValueType
extends Enum<EventValueDescription.ValueType>

Represents the type of a numerical value. This is used to display values of vastly different type/range in graphs.


Enum Constant Summary
ALLOCATIONS
           
BYTES
           
ID
           
MILLISECONDS
           
NOT_APPLICABLE
           
OBJECTS
           
PERCENT
           
 
Method Summary
 void checkType(EventContainer.EventValueType type)
          Checks that the EventContainer.EventValueType is compatible with the EventValueDescription.ValueType.
 int getValue()
          Returns the integer value of the enum.
static EventValueDescription.ValueType getValueType(int value)
          Returns a EventValueDescription.ValueType from an integer value, or null if no match were found.
 String toString()
           
static EventValueDescription.ValueType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static EventValueDescription.ValueType[] 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

NOT_APPLICABLE

public static final EventValueDescription.ValueType NOT_APPLICABLE

OBJECTS

public static final EventValueDescription.ValueType OBJECTS

BYTES

public static final EventValueDescription.ValueType BYTES

MILLISECONDS

public static final EventValueDescription.ValueType MILLISECONDS

ALLOCATIONS

public static final EventValueDescription.ValueType ALLOCATIONS

ID

public static final EventValueDescription.ValueType ID

PERCENT

public static final EventValueDescription.ValueType PERCENT
Method Detail

values

public static EventValueDescription.ValueType[] 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 (EventValueDescription.ValueType c : EventValueDescription.ValueType.values())
    System.out.println(c);

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

valueOf

public static EventValueDescription.ValueType valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

checkType

public void checkType(EventContainer.EventValueType type)
               throws InvalidValueTypeException
Checks that the EventContainer.EventValueType is compatible with the EventValueDescription.ValueType.

Parameters:
type - the EventContainer.EventValueType to check.
Throws:
InvalidValueTypeException - if the types are not compatible.

getValueType

public static EventValueDescription.ValueType getValueType(int value)
Returns a EventValueDescription.ValueType from an integer value, or null if no match were found.

Parameters:
value - the integer value.

getValue

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


toString

public String toString()
Overrides:
toString in class Enum<EventValueDescription.ValueType>


Copyright © 2008-2012. All Rights Reserved.