TtsSpan.MoneyBuilder


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

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


A builder for TtsSpans of type TtsSpan.TYPE_MONEY.

Summary

Public constructors

MoneyBuilder()

Creates a TtsSpan of type TtsSpan.TYPE_MONEY.

Public methods

TtsSpan.MoneyBuilder setCurrency(String currency)

Sets the TtsSpan.ARG_CURRENCY argument.

TtsSpan.MoneyBuilder setFractionalPart(String fractionalPart)

Sets the TtsSpan.ARG_FRACTIONAL_PART argument.

TtsSpan.MoneyBuilder setIntegerPart(String integerPart)

Sets the TtsSpan.ARG_INTEGER_PART argument.

TtsSpan.MoneyBuilder setIntegerPart(long integerPart)

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

TtsSpan.MoneyBuilder setQuantity(String quantity)

Sets the TtsSpan.ARG_QUANTITY argument.

Inherited methods

Public constructors

MoneyBuilder

Added in API level 21
public MoneyBuilder ()

Creates a TtsSpan of type TtsSpan.TYPE_MONEY.

Public methods

setCurrency

Added in API level 21
public TtsSpan.MoneyBuilder setCurrency (String currency)

Sets the TtsSpan.ARG_CURRENCY argument.

Parameters
currency String: Should be a ISO4217 currency code, e.g. "USD".

Returns
TtsSpan.MoneyBuilder This instance.

setFractionalPart

Added in API level 21
public TtsSpan.MoneyBuilder setFractionalPart (String fractionalPart)

Sets the TtsSpan.ARG_FRACTIONAL_PART argument.

Parameters
fractionalPart String: Can be a string of digits of any size.

Returns
TtsSpan.MoneyBuilder This instance.

setIntegerPart

Added in API level 21
public TtsSpan.MoneyBuilder 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.MoneyBuilder This instance.

setIntegerPart

Added in API level 21
public TtsSpan.MoneyBuilder setIntegerPart (long integerPart)

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

Parameters
integerPart long: The integer part of the amount.

Returns
TtsSpan.MoneyBuilder This instance.

setQuantity

Added in API level 21
public TtsSpan.MoneyBuilder setQuantity (String quantity)

Sets the TtsSpan.ARG_QUANTITY argument.

Returns
TtsSpan.MoneyBuilder This instance.