GetMedicalDataSourcesRequest.Builder


public static final class GetMedicalDataSourcesRequest.Builder
extends Object

java.lang.Object
   ↳ android.health.connect.GetMedicalDataSourcesRequest.Builder


Builder class for GetMedicalDataSourcesRequest.

Summary

Public constructors

Builder()

Constructs a new GetMedicalDataSourcesRequest.Builder with no filters set.

Builder(GetMedicalDataSourcesRequest other)

Constructs a clone of the other GetMedicalDataSourcesRequest instance.

Builder(GetMedicalDataSourcesRequest.Builder other)

Constructs a clone of the other GetMedicalDataSourcesRequest.Builder.

Public methods

GetMedicalDataSourcesRequest.Builder addPackageName(String packageName)

Adds a package name to limit this request to.

GetMedicalDataSourcesRequest build()

Returns a new instance of GetMedicalDataSourcesRequest with the specified parameters.

GetMedicalDataSourcesRequest.Builder clearPackageNames()

Clears all package names.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

Builder

Added in U Extensions 16
public Builder ()

Constructs a new GetMedicalDataSourcesRequest.Builder with no filters set.

Builder

Added in U Extensions 16
public Builder (GetMedicalDataSourcesRequest other)

Constructs a clone of the other GetMedicalDataSourcesRequest instance.

Parameters
other GetMedicalDataSourcesRequest: This value cannot be null.

Builder

Added in U Extensions 16
public Builder (GetMedicalDataSourcesRequest.Builder other)

Constructs a clone of the other GetMedicalDataSourcesRequest.Builder.

Parameters
other GetMedicalDataSourcesRequest.Builder: This value cannot be null.

Public methods

addPackageName

Added in U Extensions 16
public GetMedicalDataSourcesRequest.Builder addPackageName (String packageName)

Adds a package name to limit this request to.

If the list of package names is empty, MedicalDataSources for all packages will be requested. Otherwise only those for the added package names are requested.

Parameters
packageName String: This value cannot be null.

Returns
GetMedicalDataSourcesRequest.Builder This value cannot be null.

Throws
IllegalArgumentException if the provided packageName is not valid.

build

Added in U Extensions 16
public GetMedicalDataSourcesRequest build ()

Returns a new instance of GetMedicalDataSourcesRequest with the specified parameters.

Returns
GetMedicalDataSourcesRequest This value cannot be null.

clearPackageNames

Added in U Extensions 16
public GetMedicalDataSourcesRequest.Builder clearPackageNames ()

Clears all package names.

Returns
GetMedicalDataSourcesRequest.Builder This value cannot be null.