public final class

DynamicBuilders.DynamicFloat.FloatFormatter.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.wear.protolayout.expression.DynamicBuilders.DynamicFloat.FloatFormatter.Builder

Overview

Builder to create DynamicBuilders.DynamicFloat.FloatFormatter objects.

Summary

Constructors
publicBuilder()

Methods
public DynamicBuilders.DynamicFloat.FloatFormatterbuild()

Builds an instance with values accumulated in this Builder.

public DynamicBuilders.DynamicFloat.FloatFormatter.BuildersetGroupingUsed(boolean groupingUsed)

Sets whether grouping is used for the formatter.

public DynamicBuilders.DynamicFloat.FloatFormatter.BuildersetMaxFractionDigits(int maxFractionDigits)

Sets maximum number of fraction digits for the formatter.

public DynamicBuilders.DynamicFloat.FloatFormatter.BuildersetMinFractionDigits(int minFractionDigits)

Sets minimum number of fraction digits for the formatter.

public DynamicBuilders.DynamicFloat.FloatFormatter.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.DynamicFloat.FloatFormatter.Builder setMinFractionDigits(int minFractionDigits)

Sets minimum number of fraction digits for the formatter. Defaults to zero if not specified. minimumFractionDigits must be <= maximumFractionDigits. If the condition is not satisfied, then minimumFractionDigits will be used for both fields.

public DynamicBuilders.DynamicFloat.FloatFormatter.Builder setMaxFractionDigits(int maxFractionDigits)

Sets maximum number of fraction digits for the formatter. Defaults to three if not specified. minimumFractionDigits must be <= maximumFractionDigits. If the condition is not satisfied, then minimumFractionDigits will be used for both fields.

public DynamicBuilders.DynamicFloat.FloatFormatter.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.DynamicFloat.FloatFormatter.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")

   DynamicFloat.constant(1234)
       .format(
           new FloatFormatter.Builder()
                           .setGroupingUsed(true).build());
 

Builds an instance with values accumulated in this Builder.