ICU-11276 Replying to code review comments.

This commit is contained in:
Shane Carr 2018-08-30 16:20:13 -07:00
parent 0c5b7c2232
commit 8210f9e7d3
No known key found for this signature in database
GPG Key ID: FCED3B24AAB18B5C
6 changed files with 22 additions and 25 deletions

View File

@ -298,7 +298,7 @@ UnicodeString FormattedNumberRange::toString(UErrorCode& status) const {
return fResults->string.toUnicodeString();
}
Appendable& FormattedNumberRange::appendTo(Appendable& appendable, UErrorCode& status) {
Appendable& FormattedNumberRange::appendTo(Appendable& appendable, UErrorCode& status) const {
if (U_FAILURE(status)) {
return appendable;
}

View File

@ -2451,9 +2451,9 @@ class U_I18N_API FormattedNumber : public UMemory {
#endif /* U_HIDE_DEPRECATED_API */
/**
* Determines the start and end indices of the next occurrence of the given <em>field</em> in the
* output string. This allows you to determine the locations of, for example, the integer part,
* fraction part, or symbols.
* Determines the start (inclusive) and end (exclusive) indices of the next occurrence of the given
* <em>field</em> in the output string. This allows you to determine the locations of, for example,
* the integer part, fraction part, or symbols.
*
* If a field occurs just once, calling this method will find that occurrence and return it. If a
* field occurs multiple times, this method may be called repeatedly with the following pattern:
@ -2472,7 +2472,7 @@ class U_I18N_API FormattedNumber : public UMemory {
* Input+output variable. On input, the "field" property determines which field to look
* up, and the "beginIndex" and "endIndex" properties determine where to begin the search.
* On output, the "beginIndex" is set to the beginning of the first occurrence of the
* field with either begin or end indices after the input indices, "endIndex" is set to
* field with either begin or end indices after the input indices; "endIndex" is set to
* the end of that occurrence of the field (exclusive index). If a field position is not
* found, the method returns FALSE and the FieldPosition may or may not be changed.
* @param status

View File

@ -34,10 +34,6 @@
* Like NumberFormatter, NumberRangeFormatter instances are immutable and thread-safe. This API is based on the
* <em>fluent</em> design pattern popularized by libraries such as Google's Guava.
*
* <p>
* This API is based on the <em>fluent</em> design pattern popularized by libraries such as Google's Guava. For
* extensive details on the design of this API, read <a href="https://goo.gl/szi5VB">the design doc</a>.
*
* @author Shane Carr
*/
@ -280,7 +276,7 @@ class U_I18N_API NumberRangeFormatterSettings {
* Overload of numberFormatterFirst() for use on an rvalue reference.
*
* @param formatterFirst
* The formatter to use for both numbers in the range.
* The formatter to use for the first number in the range.
* @return The fluent chain.
* @see #numberFormatterFirst
* @draft ICU 63
@ -291,7 +287,7 @@ class U_I18N_API NumberRangeFormatterSettings {
* Overload of numberFormatterFirst() for use on an rvalue reference.
*
* @param formatterFirst
* The formatter to use for both numbers in the range.
* The formatter to use for the first number in the range.
* @return The fluent chain.
* @see #numberFormatterFirst
* @draft ICU 63
@ -302,7 +298,7 @@ class U_I18N_API NumberRangeFormatterSettings {
* Overload of numberFormatterFirst() for use on an rvalue reference.
*
* @param formatterFirst
* The formatter to use for both numbers in the range.
* The formatter to use for the first number in the range.
* @return The fluent chain.
* @see #numberFormatterFirst
* @draft ICU 63
@ -326,7 +322,7 @@ class U_I18N_API NumberRangeFormatterSettings {
* Overload of numberFormatterSecond() for use on an rvalue reference.
*
* @param formatterSecond
* The formatter to use for both numbers in the range.
* The formatter to use for the second number in the range.
* @return The fluent chain.
* @see #numberFormatterSecond
* @draft ICU 63
@ -337,7 +333,7 @@ class U_I18N_API NumberRangeFormatterSettings {
* Overload of numberFormatterSecond() for use on an rvalue reference.
*
* @param formatterSecond
* The formatter to use for both numbers in the range.
* The formatter to use for the second number in the range.
* @return The fluent chain.
* @see #numberFormatterSecond
* @draft ICU 63
@ -348,7 +344,7 @@ class U_I18N_API NumberRangeFormatterSettings {
* Overload of numberFormatterSecond() for use on an rvalue reference.
*
* @param formatterSecond
* The formatter to use for both numbers in the range.
* The formatter to use for the second number in the range.
* @return The fluent chain.
* @see #numberFormatterSecond
* @draft ICU 63
@ -652,12 +648,12 @@ class U_I18N_API FormattedNumberRange : public UMemory {
* @draft ICU 63
* @see Appendable
*/
Appendable &appendTo(Appendable &appendable, UErrorCode& status);
Appendable &appendTo(Appendable &appendable, UErrorCode& status) const;
/**
* Determines the start and end indices of the next occurrence of the given <em>field</em> in the
* output string. This allows you to determine the locations of, for example, the integer part,
* fraction part, or symbols.
* Determines the start (inclusive) and end (exclusive) indices of the next occurrence of the given
* <em>field</em> in the output string. This allows you to determine the locations of, for example,
* the integer part, fraction part, or symbols.
*
* If both sides of the range have the same field, the field will occur twice, once before the
* range separator and once after the range separator, if applicable.

View File

@ -70,9 +70,9 @@ public class FormattedNumber {
}
/**
* Determine the start and end indices of the first occurrence of the given <em>field</em> in the
* output string. This allows you to determine the locations of the integer part, fraction part, and
* sign.
* Determines the start (inclusive) and end (exclusive) indices of the next occurrence of the given
* <em>field</em> in the output string. This allows you to determine the locations of, for example,
* the integer part, fraction part, or symbols.
*
* <p>
* If multiple different field attributes are needed, this method can be called repeatedly, or if

View File

@ -76,8 +76,9 @@ public class FormattedNumberRange {
}
/**
* Determines the start and end indices of the next occurrence of the given <em>field</em> in the output string.
* This allows you to determine the locations of, for example, the integer part, fraction part, or symbols.
* Determines the start (inclusive) and end (exclusive) indices of the next occurrence of the given
* <em>field</em> in the output string. This allows you to determine the locations of, for example,
* the integer part, fraction part, or symbols.
* <p>
* If both sides of the range have the same field, the field will occur twice, once before the range separator and
* once after the range separator, if applicable.

View File

@ -77,7 +77,7 @@ public abstract class NumberRangeFormatterSettings<T extends NumberRangeFormatte
}
/**
* Sets the NumberFormatter instances to use for the numbers in the range.
* Sets the NumberFormatter instances to use for the second number in the range.
* <p>
* The NumberFormatter instance must not have a locale applied yet; the locale specified on the
* NumberRangeFormatter will be used.