Builder

class Builder
kotlin.Any
   ↳ androidx.work.WorkQuery.Builder

A builder for WorkQuery.

Summary

Public methods

WorkQuery.Builder
addStates(@NonNull states: MutableList<WorkInfo.State!>)

Adds a List of WorkInfo.States to the WorkQuery.

WorkQuery.Builder
addTags(@NonNull tags: MutableList<String!>)

Adds a List of WorkRequest tag to the WorkQuery.

WorkQuery.Builder
addUniqueWorkNames(@NonNull uniqueWorkNames: MutableList<String!>)

Adds a List of uniqueWorkNames to the WorkQuery

WorkQuery

Creates an instance of WorkQuery.

static WorkQuery.Builder

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

static WorkQuery.Builder
fromTags(@NonNull tags: MutableList<String!>)

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

static WorkQuery.Builder
fromUniqueWorkNames(@NonNull uniqueWorkNames: MutableList<String!>)

Creates a WorkQuery.Builder with a List of uniqueWorkNames.

Public methods

addStates

@NonNull fun addStates(@NonNull states: MutableList<WorkInfo.State!>): WorkQuery.Builder

Adds a List of WorkInfo.States to the WorkQuery.

Parameters
states MutableList<WorkInfo.State!>: The List of WorkInfo.States to add
Return
WorkQuery.Builder the instance of the Builder

addTags

@NonNull fun addTags(@NonNull tags: MutableList<String!>): WorkQuery.Builder

Adds a List of WorkRequest tag to the WorkQuery.

Parameters
tags MutableList<String!>: The List of WorkRequest tags to add
Return
WorkQuery.Builder the instance of the Builder

addUniqueWorkNames

@NonNull fun addUniqueWorkNames(@NonNull uniqueWorkNames: MutableList<String!>): WorkQuery.Builder

Adds a List of uniqueWorkNames to the WorkQuery

Parameters
uniqueWorkNames MutableList<String!>: The List of unique work names to add
Return
WorkQuery.Builder the instance of the Builder

build

@NonNull fun build(): WorkQuery

Creates an instance of WorkQuery.

Return
WorkQuery the WorkQuery instance

fromStates

@NonNull static fun fromStates(@NonNull states: MutableList<WorkInfo.State!>): WorkQuery.Builder

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

Parameters
states MutableList<WorkInfo.State!>: The List of WorkInfo.State to add to the WorkQuery
Return
WorkQuery.Builder a Builder instance

fromTags

@NonNull static fun fromTags(@NonNull tags: MutableList<String!>): WorkQuery.Builder

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

Parameters
tags MutableList<String!>: The List of WorkRequest tags
Return
WorkQuery.Builder a Builder instance

fromUniqueWorkNames

@NonNull static fun fromUniqueWorkNames(@NonNull uniqueWorkNames: MutableList<String!>): WorkQuery.Builder

Creates a WorkQuery.Builder with a List of uniqueWorkNames.

Parameters
uniqueWorkNames MutableList<String!>: The List of unique work names
Return
WorkQuery.Builder a Builder instance