TemperatureDelta


public final class TemperatureDelta
extends Object implements Comparable<TemperatureDelta>

java.lang.Object
   ↳ android.health.connect.datatypes.units.TemperatureDelta


Represents a unit of temperature difference. Supported units: Celsius

Summary

Public methods

int compareTo(TemperatureDelta other)

Compares this object with the specified object for order.

boolean equals(Object object)

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

static TemperatureDelta fromCelsius(double value)

Creates a TemperatureDelta object with the specified value in Celsius degrees.

double getInCelsius()

Returns temperature delta in celsius

int hashCode()

Returns a hash code value for the object.

String toString()

Returns a string representation of the object.

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.

abstract int compareTo(TemperatureDelta o)

Compares this object with the specified object for order.

Public methods

compareTo

Added in API level 35
Also in U Extensions 13
public int compareTo (TemperatureDelta other)

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Parameters
other TemperatureDelta: the object to be compared. This value cannot be null.

Returns
int a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Throws
NullPointerException if the specified object is null
ClassCastException if the specified object's type prevents it from being compared to this object.

equals

Added in API level 35
public boolean equals (Object object)

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

Parameters
object Object: the reference object with which to compare.

Returns
boolean true if this object is the same as the object argument; false otherwise.

fromCelsius

Added in API level 35
Also in U Extensions 13
public static TemperatureDelta fromCelsius (double value)

Creates a TemperatureDelta object with the specified value in Celsius degrees.

Parameters
value double: value to be set as celsius.

Returns
TemperatureDelta This value cannot be null.

getInCelsius

Added in API level 35
Also in U Extensions 13
public double getInCelsius ()

Returns temperature delta in celsius

Returns
double

hashCode

Added in API level 35
public int hashCode ()

Returns a hash code value for the object.

Returns
int a hash code value for this object.

toString

Added in API level 35
public String toString ()

Returns a string representation of the object.

Returns
String a string representation of the object.