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 |
|
DecimalBuilder(double number, int minimumFractionDigits, int maximumFractionDigits)
Creates a TtsSpan of type |
|
DecimalBuilder(String integerPart, String fractionalPart)
Creates a TtsSpan of type |
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.DecimalBuilder
|
setFractionalPart(String fractionalPart)
Sets the |
TtsSpan.DecimalBuilder
|
setIntegerPart(String integerPart)
Sets the |
TtsSpan.DecimalBuilder
|
setIntegerPart(long integerPart)
Convenience method that converts the number to a String and sets it
to the value for |
Inherited methods | |
---|---|
Public constructors
DecimalBuilder
public DecimalBuilder ()
Creates a builder for a TtsSpan of type TtsSpan.TYPE_DECIMAL
.
DecimalBuilder
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 |
See also:
DecimalBuilder
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
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
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
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
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. |