Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

OneTimeWorkRequest.Builder

public static final class OneTimeWorkRequest.Builder
extends Builder<OneTimeWorkRequest.BuilderOneTimeWorkRequest>

java.lang.Object
   ↳ androidx.work.WorkRequest.Builder<androidx.work.OneTimeWorkRequest.Builderandroidx.work.OneTimeWorkRequest>
     ↳ androidx.work.OneTimeWorkRequest.Builder


Builder for OneTimeWorkRequests.

Summary

Public constructors

Builder(Class<? extends ListenableWorker> workerClass)

Creates a OneTimeWorkRequest.

Public methods

OneTimeWorkRequest.Builder setInputMerger(Class<? extends InputMerger> inputMerger)

Specifies the InputMerger class name for this OneTimeWorkRequest.

Inherited methods

Public constructors

Builder

public Builder (Class<? extends ListenableWorker> workerClass)

Creates a OneTimeWorkRequest.

Parameters
workerClass Class: The ListenableWorker class to run for this work

Public methods

setInputMerger

public OneTimeWorkRequest.Builder setInputMerger (Class<? extends InputMerger> inputMerger)

Specifies the InputMerger class name for this OneTimeWorkRequest.

Before workers run, they receive input Data from their parent workers, as well as anything specified directly to them via WorkRequest.Builder.setInputData(Data). An InputMerger takes all of these objects and converts them to a single merged Data to be used as the worker input. The default InputMerger is OverwritingInputMerger. This library also offers ArrayCreatingInputMerger; you can also specify your own.

Parameters
inputMerger Class: The class name of the InputMerger for this OneTimeWorkRequest

Returns
OneTimeWorkRequest.Builder The current OneTimeWorkRequest.Builder