public final class

WorkQuery.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.work.WorkQuery.Builder

Overview

A builder for WorkQuery.

Summary

Methods
public WorkQuery.BuilderaddIds(java.util.List<java.util.UUID> ids)

Adds a java.util.List of WorkRequest ids to the WorkQuery

public WorkQuery.BuilderaddStates(java.util.List<WorkInfo.State> states)

Adds a java.util.List of WorkInfo.States to the WorkQuery.

public WorkQuery.BuilderaddTags(java.util.List<java.lang.String> tags)

Adds a java.util.List of WorkRequest tag to the WorkQuery.

public WorkQuery.BuilderaddUniqueWorkNames(java.util.List<java.lang.String> uniqueWorkNames)

Adds a java.util.List of uniqueWorkNames to the WorkQuery

public WorkQuerybuild()

Creates an instance of WorkQuery.

public static WorkQuery.BuilderfromIds(java.util.List<java.util.UUID> ids)

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

public static WorkQuery.BuilderfromStates(java.util.List<WorkInfo.State> states)

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

public static WorkQuery.BuilderfromTags(java.util.List<java.lang.String> tags)

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

public static WorkQuery.BuilderfromUniqueWorkNames(java.util.List<java.lang.String> uniqueWorkNames)

Creates a WorkQuery.Builder with a java.util.List of uniqueWorkNames.

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

Methods

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

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

Parameters:

ids: The java.util.List of WorkRequest ids.

Returns:

a WorkQuery.Builder instance

public static WorkQuery.Builder fromUniqueWorkNames(java.util.List<java.lang.String> uniqueWorkNames)

Creates a WorkQuery.Builder with a java.util.List of uniqueWorkNames.

Parameters:

uniqueWorkNames: The java.util.List of unique work names

Returns:

a WorkQuery.Builder instance

public static WorkQuery.Builder fromTags(java.util.List<java.lang.String> tags)

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

Parameters:

tags: The java.util.List of WorkRequest tags

Returns:

a WorkQuery.Builder instance

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

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

Parameters:

states: The java.util.List of WorkInfo.State to add to the WorkQuery

Returns:

a WorkQuery.Builder instance

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

Adds a java.util.List of WorkRequest ids to the WorkQuery

Parameters:

ids: The java.util.List WorkRequest ids to add

Returns:

the instance of the WorkQuery.Builder

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

Adds a java.util.List of uniqueWorkNames to the WorkQuery

Parameters:

uniqueWorkNames: The java.util.List of unique work names to add

Returns:

the instance of the WorkQuery.Builder

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

Adds a java.util.List of WorkRequest tag to the WorkQuery.

Parameters:

tags: The java.util.List of WorkRequest tags to add

Returns:

the instance of the WorkQuery.Builder

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

Adds a java.util.List of WorkInfo.States to the WorkQuery.

Parameters:

states: The java.util.List of WorkInfo.States to add

Returns:

the instance of the WorkQuery.Builder

public WorkQuery build()

Creates an instance of WorkQuery.

Returns:

the WorkQuery instance