WorkQuery.Builder

public static final class WorkQuery.Builder
extends Object

java.lang.Object
   ↳ androidx.work.WorkQuery.Builder


A builder for WorkQuery.

Summary

Public methods

WorkQuery.Builder addIds(List<UUID> ids)

Adds a List of WorkRequest ids to the WorkQuery

WorkQuery.Builder addStates(List<WorkInfo.State> states)

Adds a List of WorkInfo.States to the WorkQuery.

WorkQuery.Builder addTags(List<String> tags)

Adds a List of WorkRequest tag to the WorkQuery.

WorkQuery.Builder addUniqueWorkNames(List<String> uniqueWorkNames)

Adds a List of uniqueWorkNames to the WorkQuery

WorkQuery build()

Creates an instance of WorkQuery.

static WorkQuery.Builder fromIds(List<UUID> ids)

Creates a WorkQuery.Builder with a List of WorkRequest ids.

static WorkQuery.Builder fromStates(List<WorkInfo.State> states)

Creates a WorkQuery.Builder with a List of WorkInfo.State states.

static WorkQuery.Builder fromTags(List<String> tags)

Creates a WorkQuery.Builder with a List of WorkRequest tags.

static WorkQuery.Builder fromUniqueWorkNames(List<String> uniqueWorkNames)

Creates a WorkQuery.Builder with a List of uniqueWorkNames.

Inherited methods

Public methods

addIds

public WorkQuery.Builder addIds (List<UUID> ids)

Adds a List of WorkRequest ids to the WorkQuery

Parameters
ids List: The List WorkRequest ids to add

Returns
WorkQuery.Builder the instance of the WorkQuery.Builder

addStates

public WorkQuery.Builder addStates (List<WorkInfo.State> states)

Adds a List of WorkInfo.States to the WorkQuery.

Parameters
states List: The List of WorkInfo.States to add

Returns
WorkQuery.Builder the instance of the WorkQuery.Builder

addTags

public WorkQuery.Builder addTags (List<String> tags)

Adds a List of WorkRequest tag to the WorkQuery.

Parameters
tags List: The List of WorkRequest tags to add

Returns
WorkQuery.Builder the instance of the WorkQuery.Builder

addUniqueWorkNames

public WorkQuery.Builder addUniqueWorkNames (List<String> uniqueWorkNames)

Adds a List of uniqueWorkNames to the WorkQuery

Parameters
uniqueWorkNames List: The List of unique work names to add

Returns
WorkQuery.Builder the instance of the WorkQuery.Builder

<