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 TtsSpan.TYPE_DECIMAL.

Summary

Public constructors

DecimalBuilder()

Creates a builder for a TtsSpan of type TtsSpan.TYPE_DECIMAL.

DecimalBuilder(double number, int minimumFractionDigits, int maximumFractionDigits)

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

DecimalBuilder(String integerPart, String fractionalPart)

Creates a TtsSpan of type TtsSpan.TYPE_DECIMAL and sets the TtsSpan.ARG_INTEGER_PART and TtsSpan.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 TtsSpan.ARG_INTEGER_PART and TtsSpan.ARG_FRACTIONAL_PART arguments.

TtsSpan.DecimalBuilder setFractionalPart(String fractionalPart)

Sets the TtsSpan.ARG_FRACTIONAL_PART argument.

TtsSpan.DecimalBuilder setIntegerPart(String integerPart)

Sets the TtsSpan.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 TtsSpan.ARG_INTEGER_PART.

Inherited methods

Public constructors

DecimalBuilder

Added in API level 21
public DecimalBuilder ()

Creates a builder for a TtsSpan of type TtsSpan.TYPE_DECIMAL.

DecimalBuilder

Added in API level 21
public DecimalBuilder (double number, 
                int minimumFractionDigits, 
                int maximumFractionDigits)

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

Parameters
number double

minimumFractionDigits int

maximumFractionDigits int

DecimalBuilder

Added in API level 21
public DecimalBuilder (String integerPart, 
                String fractionalPart)

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

Parameters
integerPart String

fractionalPart String

Public methods

setArgumentsFromDouble

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

Convenience method takes a double and a maximum number of fractional digits, it sets the TtsSpan.ARG_INTEGER_PART and TtsSpan.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
public TtsSpan.DecimalBuilder setFractionalPart (String fractionalPart)

Sets the TtsSpan.ARG_FRACTIONAL_PART argument.

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

Returns
TtsSpan.DecimalBuilder This instance.

setIntegerPart

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

Sets the TtsSpan.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
public TtsSpan.DecimalBuilder setIntegerPart (long integerPart)

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

Parameters
integerPart long: The integer part of the decimal.

Returns
TtsSpan.DecimalBuilder This instance.