DynamicBuilders.DynamicInt32.IntFormatter.Builder


class DynamicBuilders.DynamicInt32.IntFormatter.Builder


Builder to create IntFormatter objects.

Summary

Public constructors

Public functions

DynamicBuilders.DynamicInt32.IntFormatter

Builds an instance with values accumulated in this Builder.

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

Sets whether grouping is used for the formatter.

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

Sets minimum number of integer digits for the formatter.

Public constructors

Builder

Added in 1.0.0
Builder()

Public functions

build

Added in 1.0.0
fun build(): DynamicBuilders.DynamicInt32.IntFormatter

Builds an instance with values accumulated in this Builder.

setGroupingUsed

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 200)
fun setGroupingUsed(groupingUsed: Boolean): DynamicBuilders.DynamicInt32.IntFormatter.Builder

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)
fun setMinIntegerDigits(minIntegerDigits: @IntRange(from = 0) Int): DynamicBuilders.DynamicInt32.IntFormatter.Builder

Sets minimum number of integer digits for the formatter. Defaults to one if not specified. If minIntegerDigits is zero and the -1