DynamicBuilders.DynamicInt32.IntFormatter.Builder


public final class DynamicBuilders.DynamicInt32.IntFormatter.Builder


Builder to create IntFormatter objects.

Summary

Public constructors

Public methods

@NonNull DynamicBuilders.DynamicInt32.IntFormatter

Builds an instance with values accumulated in this Builder.

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

Sets whether grouping is used for the formatter.

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

Sets minimum number of integer digits for the formatter.

Public constructors

Builder

Added in 1.0.0
public Builder()

Public methods

build

Added in 1.0.0
public @NonNull DynamicBuilders.DynamicInt32.IntFormatter build()

Builds an instance with values accumulated in this Builder.

setGroupingUsed

Added in 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
@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