# Pressure

Artifact: [androidx.health.connect:connect-client](https://developer.android.com/jetpack/androidx/releases/health-connect) [View Source](https://cs.android.com/search?q=file:androidx/health/connect/client/units/Pressure.kt+class:androidx.health.connect.client.units.Pressure) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

*** ** * ** ***


```
public final class Pressure implements Comparable<@NonNull Pressure>
```

<br />

*** ** * ** ***

Represents a unit of pressure. Supported units:

- millimeters of Mercury (mmHg) - see `https://developer.android.com/reference/androidx/health/connect/client/units/Pressure#millimetersOfMercury(kotlin.Double)`, `https://developer.android.com/reference/androidx/health/connect/client/units/package-summary#(kotlin.Double).millimetersOfMercury()`.

## Summary

| ### Public methods |
|---|---|
| `int` | `https://developer.android.com/reference/androidx/health/connect/client/units/Pressure#compareTo(androidx.health.connect.client.units.Pressure)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/units/Pressure other)` |
| `boolean` | `https://developer.android.com/reference/androidx/health/connect/client/units/Pressure#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final double` | `https://developer.android.com/reference/androidx/health/connect/client/units/Pressure#getMillimetersOfMercury()()` Returns the pressure in millimeters of Mercury (mmHg). |
| `int` | `https://developer.android.com/reference/androidx/health/connect/client/units/Pressure#hashCode()()` |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/units/Pressure` | `https://developer.android.com/reference/androidx/health/connect/client/units/Pressure#millimetersOfMercury(kotlin.Double)(double value)` Creates `https://developer.android.com/reference/androidx/health/connect/client/units/Pressure` with the specified value in millimeters of Mercury (mmHg). |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/health/connect/client/units/Pressure#toString()()` |

## Public methods

### compareTo

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

```
public int compareTo(@NonNull Pressure other)
```

### equals

```
public boolean equals(Object other)
```

### getMillimetersOfMercury

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

```
public final double getMillimetersOfMercury()
```

Returns the pressure in millimeters of Mercury (mmHg).

### hashCode

```
public int hashCode()
```

### millimetersOfMercury

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

```
public static final @NonNull Pressure millimetersOfMercury(double value)
```

Creates `https://developer.android.com/reference/androidx/health/connect/client/units/Pressure` with the specified value in millimeters of Mercury (mmHg).

### toString

```
public @NonNull String toString()
```