# DynamicBuilders.DynamicInt32.IntFormatter.Builder

Artifact: [androidx.wear.protolayout:protolayout-expression](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/expression/DynamicBuilders.java+class:androidx.wear.protolayout.expression.DynamicBuilders.DynamicInt32.IntFormatter.Builder) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

*** ** * ** ***


```
public final class DynamicBuilders.DynamicInt32.IntFormatter.Builder
```

<br />

*** ** * ** ***

Builder to create `https://developer.android.com/reference/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInt32.IntFormatter` objects.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInt32.IntFormatter.Builder#Builder()()` |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInt32.IntFormatter` | `https://developer.android.com/reference/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInt32.IntFormatter.Builder#build()()` Builds an instance with values accumulated in this Builder. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInt32.IntFormatter.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) https://developer.android.com/reference/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInt32.IntFormatter.Builder#setGroupingUsed(boolean)(boolean groupingUsed)` Sets whether grouping is used for the formatter. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInt32.IntFormatter.Builder` | `@https://developer.android.com/reference/androidx/wear/protolayout/expression/RequiresSchemaVersion(major = 1, minor = 200) https://developer.android.com/reference/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInt32.IntFormatter.Builder#setMinIntegerDigits(int)(@https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) int minIntegerDigits)` Sets minimum number of integer digits for the formatter. |

## Public constructors

### Builder

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public Builder()
```

## Public methods

### build

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
public @NonNull DynamicBuilders.DynamicInt32.IntFormatter build()
```

Builds an instance with values accumulated in this Builder.

### setGroupingUsed

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
@RequiresSchemaVersion(major = 1, minor = 200)
public @NonNull DynamicBuilders.DynamicInt32.IntFormatter.Builder setGroupingUsed(boolean groupingUsed)
```

Sets whether grouping is used for the formatter. Defaults to false if not specified. If grouping is used, digits will be grouped into digit groups using a separator. Digit group size and used separator can vary in different countries/regions. As an example, for locale en_US, the following is equal to `* DynamicString.constant("1,234")`

```
  DynamicInt32.constant(1234)
      .format(
          new IntFormatter.Builder()
                          .setGroupingUsed(true).build());
```

### setMinIntegerDigits

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
@RequiresSchemaVersion(major = 1, minor = 200)
public @NonNull DynamicBuilders.DynamicInt32.IntFormatter.Builder setMinIntegerDigits(@IntRange(from = 0) int minIntegerDigits)
```

Sets minimum number of integer digits for the formatter. Defaults to one if not specified. If minIntegerDigits is zero and the -1 \<1, the Integer part will not appear.