public static class TtsSpan.DecimalBuilder extends TtsSpan.SemioticClassBuilder<TtsSpan.DecimalBuilder>
TtsSpan.TYPE_DECIMAL
.Constructor and Description |
---|
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. |
Modifier and Type | Method and Description |
---|---|
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(long integerPart)
Convenience method that converts the number to a String and sets it
to the value for
TtsSpan.ARG_INTEGER_PART . |
TtsSpan.DecimalBuilder |
setIntegerPart(String integerPart)
Sets the
TtsSpan.ARG_INTEGER_PART argument. |
setAnimacy, setCase, setGender, setMultiplicity
build, setIntArgument, setLongArgument, setStringArgument
public DecimalBuilder()
TtsSpan.TYPE_DECIMAL
.public DecimalBuilder(double number, int minimumFractionDigits, int maximumFractionDigits)
TtsSpan.TYPE_DECIMAL
and sets the
TtsSpan.ARG_INTEGER_PART
and TtsSpan.ARG_FRACTIONAL_PART
arguments.#setArgumentsFromDouble(double, int, int)
public DecimalBuilder(String integerPart, String fractionalPart)
TtsSpan.TYPE_DECIMAL
and sets the
TtsSpan.ARG_INTEGER_PART
and TtsSpan.ARG_FRACTIONAL_PART
arguments.public TtsSpan.DecimalBuilder setArgumentsFromDouble(double number, int minimumFractionDigits, int maximumFractionDigits)
TtsSpan.ARG_INTEGER_PART
and
TtsSpan.ARG_FRACTIONAL_PART
arguments.number
- The number to be synthesized.minimumFractionDigits
- The minimum number of fraction digits
that are pronounced.maximumFractionDigits
- The maximum number of fraction digits
that are pronounced. If maximumFractionDigits <
minimumFractionDigits then minimumFractionDigits will be assumed
to be equal to maximumFractionDigits.public TtsSpan.DecimalBuilder setIntegerPart(long integerPart)
TtsSpan.ARG_INTEGER_PART
.integerPart
- The integer part of the decimal.public TtsSpan.DecimalBuilder setIntegerPart(String integerPart)
TtsSpan.ARG_INTEGER_PART
argument.integerPart
- A non-empty string of digits with an optional
leading + or -.public TtsSpan.DecimalBuilder setFractionalPart(String fractionalPart)
TtsSpan.ARG_FRACTIONAL_PART
argument.fractionalPart
- A non-empty string of digits.