MedicalDataSource.Builder


public static final class MedicalDataSource.Builder
extends Object

java.lang.Object
   ↳ android.health.connect.datatypes.MedicalDataSource.Builder


Builder class for MedicalDataSource.

Summary

Public constructors

Builder(MedicalDataSource other)

Constructs a clone of the other MedicalDataSource instance.

Builder(MedicalDataSource.Builder other)

Constructs a clone of the other MedicalDataSource.Builder.

Builder(String id, String packageName, Uri fhirBaseUri, String displayName, FhirVersion fhirVersion)

Constructs a new MedicalDataSource.Builder instance.

Public methods

MedicalDataSource build()

Returns a new instance of MedicalDataSource with the specified parameters.

MedicalDataSource.Builder setDisplayName(String displayName)

Sets the display name that describes this data source.

MedicalDataSource.Builder setFhirBaseUri(Uri fhirBaseUri)

Sets the FHIR base URI of this data source.

MedicalDataSource.Builder setFhirVersion(FhirVersion fhirVersion)

Sets the FHIR version of MedicalResources linked to this source.

MedicalDataSource.Builder setId(String id)

Sets unique identifier of this data source.

MedicalDataSource.Builder setLastDataUpdateTime(Instant lastDataUpdateTime)

Sets the time MedicalResources linked to this data source were last updated.

MedicalDataSource.Builder setPackageName(String packageName)

Sets the package name of the contributing package.

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 (MedicalDataSource other)

Constructs a clone of the other MedicalDataSource instance.

Parameters
other MedicalDataSource: This value cannot be null.

Builder

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

Constructs a clone of the other MedicalDataSource.Builder.

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

Builder

Added in U Extensions 16
public Builder (String id, 
                String packageName, 
                Uri fhirBaseUri, 
                String displayName, 
                FhirVersion fhirVersion)

Constructs a new MedicalDataSource.Builder instance.

Parameters
id String: The unique identifier of this data source. This value cannot be null.

packageName String: The package name of the owning app. This value cannot be null.

fhirBaseUri Uri: The FHIR base URI of the data source. This value cannot be null.

displayName String: The display name that describes the data source. This value cannot be null.

fhirVersion FhirVersion: The FHIR version of MedicalResources linked to this source. This value cannot be null.

Public methods

build

Added in U Extensions 16
public MedicalDataSource build ()

Returns a new instance of MedicalDataSource with the specified parameters.

Returns
MedicalDataSource This value cannot be null.

setDisplayName

Added in U Extensions 16
public MedicalDataSource.Builder setDisplayName (String displayName)

Sets the display name that describes this data source.

Parameters
displayName String: This value cannot be null.

Returns
MedicalDataSource.Builder This value cannot be null.

setFhirBaseUri

Added in U Extensions 16
public MedicalDataSource.Builder setFhirBaseUri (Uri fhirBaseUri)

Sets the FHIR base URI of this data source.

Parameters
fhirBaseUri Uri: This value cannot be null.

Returns
MedicalDataSource.Builder This value cannot be null.

setFhirVersion

Added in U Extensions 16
public MedicalDataSource.Builder setFhirVersion (FhirVersion fhirVersion)

Sets the FHIR version of MedicalResources linked to this source.

Parameters
fhirVersion FhirVersion: This value cannot be null.

Returns
MedicalDataSource.Builder This value cannot be null.

setId

Added in U Extensions 16
public MedicalDataSource.Builder setId (String id)

Sets unique identifier of this data source.

Parameters
id String: This value cannot be null.

Returns
MedicalDataSource.Builder This value cannot be null.

setLastDataUpdateTime

Added in U Extensions 16
public MedicalDataSource.Builder setLastDataUpdateTime (Instant lastDataUpdateTime)

Sets the time MedicalResources linked to this data source were last updated.

Parameters
lastDataUpdateTime Instant: This value may be null.

Returns
MedicalDataSource.Builder This value cannot be null.

setPackageName

Added in U Extensions 16
public MedicalDataSource.Builder setPackageName (String packageName)

Sets the package name of the contributing package. Auto-populated by the platform at source creation time.

Parameters
packageName String: This value cannot be null.

Returns
MedicalDataSource.Builder This value cannot be null.