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

InputMerger

abstract class InputMerger
kotlin.Any
   ↳ androidx.work.InputMerger

An abstract class that allows the user to define how to merge a list of inputs to a ListenableWorker.

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. WorkManager offers two concrete InputMerger implementations: OverwritingInputMerger and ArrayCreatingInputMerger.

Note that the list of inputs to merge is in an unspecified order. You should not make assumptions about the order of inputs.

Summary

Public constructors

An abstract class that allows the user to define how to merge a list of inputs to a ListenableWorker.

Public methods
abstract Data
merge(@NonNull inputs: MutableList<Data!>)

Merges a list of Data and outputs a single Data object.

Public constructors

<init>

InputMerger()

An abstract class that allows the user to define how to merge a list of inputs to a ListenableWorker.

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. WorkManager offers two concrete InputMerger implementations: OverwritingInputMerger and ArrayCreatingInputMerger.

Note that the list of inputs to merge is in an unspecified order. You should not make assumptions about the order of inputs.

Public methods

merge

@NonNull abstract fun merge(@NonNull inputs: MutableList<Data!>): Data

Merges a list of Data and outputs a single Data object.

Parameters
inputs MutableList<Data!>: A list of Data
Return
Data The merged output