to top
public enum

OptionUpdateRule

extends Enum<E extends Enum<E>>
java.lang.Object
   ↳ java.lang.Enum<E extends java.lang.Enum<E>>
     ↳ 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
Object update(String optionName, Object optionSource, Field field, Object update)
Takes the current value and the update value, and returns the value to be set.
static OptionUpdateRule valueOf(String name)
final static 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 Object update (String optionName, Object optionSource, Field field, Object update)

Takes the current value and the update value, and returns the value to be set. Assumes that update is never null.

public static OptionUpdateRule valueOf (String name)

public static final OptionUpdateRule[] values ()