Pressure
class Pressure : Comparable<Pressure!>
| kotlin.Any | |
| ↳ | android.health.connect.datatypes.units.Pressure | 
Represents a unit of pressure. Supported units: millimeters of Mercury (mmHg)
Summary
| Public methods | |
|---|---|
| Int | Compares this object with the specified object for order. | 
| Boolean | Indicates whether some other object is "equal to" this one. | 
| static Pressure | fromMillimetersOfMercury(value: Double)Creates a Pressure object with the specified value in millimeters of Mercury (mmHg). | 
| Double | Returns pressure in millimeters of mercury | 
| Int | hashCode()Returns a hash code value for the object. | 
| String | toString() | 
Public methods
compareTo
fun compareTo(other: Pressure): Int
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 | |
|---|---|
| o | the object to be compared. | 
| other | Pressure: the object to be compared. This value cannot be null. | 
| Return | |
|---|---|
| Int | a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. | 
| Exceptions | |
|---|---|
| java.lang.NullPointerException | if the specified object is null | 
| java.lang.ClassCastException | if the specified object's type prevents it from being compared to this object. | 
equals
fun equals(other: Any?): Boolean
Indicates whether some other object is "equal to" this one.
| Parameters | |
|---|---|
| obj | the reference object with which to compare. | 
| object | the reference object with which to compare. | 
| Return | |
|---|---|
| Boolean | trueif this object is the same as the object argument;falseotherwise. | 
fromMillimetersOfMercury
static fun fromMillimetersOfMercury(value: Double): Pressure
Creates a Pressure object with the specified value in millimeters of Mercury (mmHg).
| Parameters | |
|---|---|
| value | Double: value to be set as millimeters of Mercury. | 
| Return | |
|---|---|
| Pressure | This value cannot be null. | 
getInMillimetersOfMercury
fun getInMillimetersOfMercury(): Double
Returns pressure in millimeters of mercury
hashCode
fun hashCode(): Int
Returns a hash code value for the object.
| Return | |
|---|---|
| Int | a hash code value for this object. | 
toString
fun toString(): String
| Return | |
|---|---|
| String | a string representation of the object. | 
