ExecutionProperties

public class ExecutionProperties
extends Object

java.lang.Object
   ↳ com.android.tradefed.invoker.ExecutionProperties


Properties generated during the execution of a test or invocation.

Keys are recommended to be made unique by using namespace as appropriate to avoid cross-test overlap.

Summary

Public methods

void clear()

Clear the execution properties.

boolean containsKey(String key)

Returns true if this map contains a mapping for the specified key.

String get(String key)

Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.

ImmutableMap<String, String> getAll()

Returns all the properties in a copy of the map

boolean isEmpty()

Returns whether or not the map of properties is empty.

String put(String key, String value)

Associates the specified value with the specified key in this map.

ExecutionProperties putAll( properties)

Copies all of the mappings from the specified map to this map.

String putIfAbsent(String key, String value)

If the specified key is not already associated with a value, associates it with the given value.

String remove(String key)

Removes the mapping for a key from this map if it is present (optional operation).

String toString()

Public methods

clear

public void clear ()

Clear the execution properties. Used during reset isolation to remove exec data.

containsKey

public boolean containsKey (String key)

Returns true if this map contains a mapping for the specified key.

Parameters
key String: key whose presence in this map is to be tested

Returns
boolean true if this map contains a mapping for the specified key

get

public String get (String key)

Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.

Parameters
key String: the key whose associated value is to be returned

Returns
String the value to which the specified key is mapped, or null if this map contains no mapping for the key

getAll

public ImmutableMap<String, String> getAll ()

Returns all the properties in a copy of the map

Returns
ImmutableMap<String, String>

isEmpty

public boolean isEmpty ()

Returns whether or not the map of properties is empty.

Returns
boolean

put

public String put (String key, 
                String value)

Associates the specified value with the specified key in this map.

Parameters
key String: key with which the specified value is to be associated

value String: value to be associated with the specified key

Returns
String the previous value associated with key, or null if there was no mapping for key.

putAll

public ExecutionProperties putAll ( properties)

Copies all of the mappings from the specified map to this map.

Parameters
properties : mappings to be stored in this map

Returns
ExecutionProperties The final mapping

putIfAbsent

public String putIfAbsent (String key, 
                String value)

If the specified key is not already associated with a value, associates it with the given value.

Parameters
key String: key with which the specified value is to be associated

value String: value to be associated with the specified key

Returns
String the previous value associated with the specified key, or null if there was no mapping for the key.

remove

public String remove (String key)

Removes the mapping for a key from this map if it is present (optional operation).

Parameters
key String: key whose mapping is to be removed from the map

Returns
String the previous value associated with key, or null if there was no mapping for key.

toString

public String toString ()

Returns
String