public abstract class

Config.Option<T>

extends java.lang.Object

 java.lang.Object

↳androidx.camera.core.Config.Option<T>

Overview

An Config.Option is used to set and retrieve values for settings defined in a Config.

Config.Options can be thought of as the key in a key/value pair that makes up a setting. As the name suggests, Config.Options are optional, and may or may not exist inside a Config.

Summary

Methods
public static Config.Option<java.lang.Object>create(java.lang.String id, java.lang.Class<java.lang.Object> valueClass)

Creates an Config.Option from an id and value class.

public static Config.Option<java.lang.Object>create(java.lang.String id, java.lang.Class<java.lang.Object> valueClass, java.lang.Object token)

Creates an Config.Option from an id, value class and token.

public abstract java.lang.StringgetId()

Returns the unique string identifier for this option.

public abstract java.lang.ObjectgetToken()

Returns the optional type-erased context object for this option.

public abstract java.lang.Class<java.lang.Object>getValueClass()

Returns the class object associated with the value for this option.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods

public static Config.Option<java.lang.Object> create(java.lang.String id, java.lang.Class<java.lang.Object> valueClass)

Creates an Config.Option from an id and value class.

Parameters:

id: A unique string identifier for this option. This generally follows the scheme <owner>.[optional.subCategories.]<optionId>.
valueClass: The class of the value stored by this option.

Returns:

An Config.Option object which can be used to store/retrieve values from a Config.

public static Config.Option<java.lang.Object> create(java.lang.String id, java.lang.Class<java.lang.Object> valueClass, java.lang.Object token)

Creates an Config.Option from an id, value class and token.

Parameters:

id: A unique string identifier for this option. This generally follows the scheme <owner>.[optional.subCategories.]<optionId>.
valueClass: The class of the value stored by this option.
token: An optional, type-erased object for storing more context for this specific option. Generally this object should have static scope and be immutable.

Returns:

An Config.Option object which can be used to store/retrieve values from a Config.

public abstract java.lang.String getId()

Returns the unique string identifier for this option.

This generally follows the scheme * <owner>.[optional.subCategories.]<optionId> .

Returns:

The identifier.

public abstract java.lang.Class<java.lang.Object> getValueClass()

Returns the class object associated with the value for this option.

Returns:

The class object for the value's type.

public abstract java.lang.Object getToken()

Returns the optional type-erased context object for this option.

Generally this object should have static scope and be immutable.

Returns:

The type-erased context object.