public final class

DynamicBuilders.DynamicInt32.IntFormatter.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.wear.protolayout.expression.DynamicBuilders.DynamicInt32.IntFormatter.Builder

Overview

Builder to create DynamicBuilders.DynamicInt32.IntFormatter objects.

Summary

Constructors
publicBuilder()

Methods
public DynamicBuilders.DynamicInt32.IntFormatterbuild()

Builds an instance with values accumulated in this Builder.

public DynamicBuilders.DynamicInt32.IntFormatter.BuildersetGroupingUsed(boolean groupingUsed)

Sets whether grouping is used for the formatter.

public DynamicBuilders.DynamicInt32.IntFormatter.BuildersetMinIntegerDigits(int minIntegerDigits)

Sets minimum number of integer digits for the formatter.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Methods

public DynamicBuilders.DynamicInt32.IntFormatter.Builder setMinIntegerDigits(int minIntegerDigits)

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

public 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());
 

Builds an instance with values accumulated in this Builder.