TtsSpan.DecimalBuilder

public static class TtsSpan.DecimalBuilder
extends SemioticClassBuilder<TtsSpan.DecimalBuilder>

java.lang.Object
   ↳ android.text.style.TtsSpan.Builder<C extends android.text.style.TtsSpan.SemioticClassBuilder<?>>
     ↳ android.text.style.TtsSpan.SemioticClassBuilder<android.text.style.TtsSpan.DecimalBuilder>
       ↳ android.text.style.TtsSpan.DecimalBuilder


A builder for TtsSpans of type TYPE_DECIMAL.

Summary

Public constructors

TtsSpan.DecimalBuilder()

Creates a builder for a TtsSpan of type TYPE_DECIMAL.

TtsSpan.DecimalBuilder(double number, int minimumFractionDigits, int maximumFractionDigits)

Creates a TtsSpan of type TYPE_DECIMAL and sets the ARG_INTEGER_PART and ARG_FRACTIONAL_PART arguments.

TtsSpan.DecimalBuilder(String integerPart, String fractionalPart)

Creates a TtsSpan of type TYPE_DECIMAL and sets the ARG_INTEGER_PART and ARG_FRACTIONAL_PART arguments.

Public methods

TtsSpan.DecimalBuilder setArgumentsFromDouble(double number, int minimumFractionDigits, int maximumFractionDigits)

Convenience method takes a double and a maximum number of fractional digits, it sets the ARG_INTEGER_PART and ARG_FRACTIONAL_PART arguments.

TtsSpan.DecimalBuilder setFractionalPart(String fractionalPart)

Sets the ARG_FRACTIONAL_PART argument.

TtsSpan.DecimalBuilder setIntegerPart(String integerPart)

Sets the ARG_INTEGER_PART argument.

TtsSpan.DecimalBuilder setIntegerPart(long integerPart)

Convenience method that converts the number to a String and sets it to the value for ARG_INTEGER_PART.

Inherited methods

Public constructors

TtsSpan.DecimalBuilder

added in API level 21
TtsSpan.DecimalBuilder ()

Creates a builder for a TtsSpan of type TYPE_DECIMAL.

TtsSpan.DecimalBuilder

added in API level 21
TtsSpan.DecimalBuilder (double number, 
                int minimumFractionDigits, 
                int maximumFractionDigits)

Creates a TtsSpan of type TYPE_DECIMAL and sets the ARG_INTEGER_PART and ARG_FRACTIONAL_PART arguments.

Parameters
number double

minimumFractionDigits int

maximumFractionDigits int

TtsSpan.DecimalBuilder

added in API level 21
TtsSpan.DecimalBuilder (String integerPart, 
                String fractionalPart)

Creates a TtsSpan of type TYPE_DECIMAL and sets the ARG_INTEGER_PART and ARG_FRACTIONAL_PART arguments.

Parameters
integerPart String

fractionalPart String

Public methods

setArgumentsFromDouble

added in API level 21
TtsSpan.DecimalBuilder setArgumentsFromDouble (double number, 
                int minimumFractionDigits, 
                int maximumFractionDigits)

Convenience method takes a double and a maximum number of fractional digits, it sets the ARG_INTEGER_PART and ARG_FRACTIONAL_PART arguments.

Parameters
number double: The number to be synthesized.

minimumFractionDigits int: The minimum number of fraction digits that are pronounced.

maximumFractionDigits int: The maximum number of fraction digits that are pronounced. If maximumFractionDigits < minimumFractionDigits then minimumFractionDigits will be assumed to be equal to maximumFractionDigits.

Returns
TtsSpan.DecimalBuilder This instance.

setFractionalPart

added in API level 21
TtsSpan.DecimalBuilder setFractionalPart (String fractionalPart)

Sets the ARG_FRACTIONAL_PART argument.

Parameters
fractionalPart String: A non-empty string of digits.

Returns
TtsSpan.DecimalBuilder This instance.

setIntegerPart

added in API level 21
TtsSpan.DecimalBuilder setIntegerPart (String integerPart)

Sets the ARG_INTEGER_PART argument.

Parameters
integerPart String: A non-empty string of digits with an optional leading + or -.

Returns
TtsSpan.DecimalBuilder This instance.

setIntegerPart

added in API level 21
TtsSpan.DecimalBuilder setIntegerPart (long integerPart)

Convenience method that converts the number to a String and sets it to the value for ARG_INTEGER_PART.

Parameters
integerPart long: The integer part of the decimal.

Returns
TtsSpan.DecimalBuilder This instance.