# NotificationCompat.Metric.FixedInt

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/app/NotificationCompat.java+class:androidx.core.app.NotificationCompat.Metric.FixedInt) Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

*** ** * ** ***


```
public final class NotificationCompat.Metric.FixedInt extends NotificationCompat.Metric.MetricValue
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.core.app.NotificationCompat.Metric.MetricValue](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.MetricValue) ||
|   | ↳ | [androidx.core.app.NotificationCompat.Metric.FixedInt](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedInt) |

*** ** * ** ***

Metric corresponding to an integer value.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedInt#FixedInt(int)(int value)` Creates a `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedInt` instance with the specified integer value, and no unit text. |
| `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedInt#FixedInt(int,java.lang.CharSequence)(int value, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html unit)` Creates a `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedInt` instance with the specified integer value. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedInt#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object.html obj)` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html` | `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedInt#getUnit()()` A unit for the value. |
| `int` | `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedInt#getValue()()` The integer value. |
| `int` | `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedInt#hashCode()()` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedInt#toString()()` |

## Public constructors

### FixedInt

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public FixedInt(int value)
```

Creates a `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedInt` instance with the specified integer value, and no unit text.

### FixedInt

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public FixedInt(int value, @Nullable CharSequence unit)
```

Creates a `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedInt` instance with the specified integer value.

| Parameters |
|---|---|
| `int value` | integer value |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html unit` | optional unit for the value. Limit this to a few characters. |

## Public methods

### equals

```
public boolean equals(Object obj)
```

### getUnit

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public @Nullable CharSequence getUnit()
```

A unit for the value.

This may not be shown to the user in all views.

The space allocated to this will be limited. It's recommended to limit this to just a few characters.

### getValue

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
public int getValue()
```

The integer value.

### hashCode

```
public int hashCode()
```

### toString

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