to top
public enum

OptionUpdateRule

extends Enum<OptionUpdateRule>
java.lang.Object
   ↳ java.lang.Enum<com.android.tradefed.config.OptionUpdateRule>
     ↳ com.android.tradefed.config.OptionUpdateRule

Class Overview

Controls the behavior when an option is specified multiple times. Note that this enum assumes that the values to be set are not Collections or Maps.

Summary

Enum Values
OptionUpdateRule  FIRST  once an option is set, subsequent attempts to update it should be ignored. 
OptionUpdateRule  GREATEST  for Comparable options, keep the one that compares as the greatest. 
OptionUpdateRule  IMMUTABLE  throw a ConfigurationException if this option is set more than once. 
OptionUpdateRule  LAST  if an option is set multiple times, ignore all but the last value. 
OptionUpdateRule  LEAST  for Comparable options, keep the one that compares as the least. 
Public Methods
boolean shouldUpdate(String optionName, Object optionSource, Field field, Object update)
Takes the current value and the update value, and returns whether the value should be updated.
static OptionUpdateRule valueOf(String name)
static final OptionUpdateRule[] values()
[Expand]
Inherited Methods
From class java.lang.Enum
From class java.lang.Object
From interface java.lang.Comparable

Enum Values

public static final OptionUpdateRule FIRST

once an option is set, subsequent attempts to update it should be ignored.

public static final OptionUpdateRule GREATEST

for Comparable options, keep the one that compares as the greatest.

public static final OptionUpdateRule IMMUTABLE

throw a ConfigurationException if this option is set more than once.

public static final OptionUpdateRule LAST

if an option is set multiple times, ignore all but the last value.

public static final OptionUpdateRule LEAST

for Comparable options, keep the one that compares as the least.

Public Methods

public boolean shouldUpdate (String optionName, Object optionSource, Field field, Object update)

Takes the current value and the update value, and returns whether the value should be updated. Assumes that update is never null.

Parameters
optionName String
optionSource Object
field Field
update Object
Returns
boolean
Throws
ConfigurationException

public static OptionUpdateRule valueOf (String name)

Parameters
name String
Returns
OptionUpdateRule

public static final OptionUpdateRule[] values ()