diff --git a/icu4j/src/com/ibm/icu/text/MessageFormat.java b/icu4j/src/com/ibm/icu/text/MessageFormat.java
index 2607341a1e..491fe7e970 100644
--- a/icu4j/src/com/ibm/icu/text/MessageFormat.java
+++ b/icu4j/src/com/ibm/icu/text/MessageFormat.java
@@ -1107,7 +1107,7 @@ public class MessageFormat extends UFormat {
* arguments
is not of the type
* expected by the format element(s) that use it
* @throws IllegalArgumentException if arguments
is
- * an arry of Object and this format uses named arguments
+ * an array of Object and this format uses named arguments
* @stable ICU 3.0
*/
public final StringBuffer format(Object arguments, StringBuffer result,
@@ -1414,18 +1414,12 @@ public class MessageFormat extends UFormat {
* index information as described above.
* @return An
Object
parsed from the string, either an
* array of Object, or a Map, depending on whether named
- * arguments were used. In case of error, returns null.
+ * arguments are used. This can be queried using usesNamedArguments
.
+ * In case of error, returns null.
* @throws NullPointerException if pos
is null.
* @stable ICU 3.0
*/
public Object parseObject(String source, ParsePosition pos) {
- // TODO That's a bit tricky.
- // This method is defined in java.text.Format, so we have to implement
- // it for formats using number arguments and formats using named
- // arguments.
- // The bad thing of the current solution is, that the pattern defines
- // which kind of object is returned.
- // --> Add a method like public boolean hasNumericArguments()
if (argumentNamesAreNumeric) {
return parse(source, pos);
} else {
diff --git a/icu4j/src/com/ibm/icu/text/PluralFormat.java b/icu4j/src/com/ibm/icu/text/PluralFormat.java
index d0167da05e..3f8a53b659 100644
--- a/icu4j/src/com/ibm/icu/text/PluralFormat.java
+++ b/icu4j/src/com/ibm/icu/text/PluralFormat.java
@@ -36,7 +36,7 @@ import java.util.Set;
* each message and selects the message whose interval contains a
* given number. This can only handle a finite number of
* intervals. But in some languages, like Polish, one plural case
- * applies to infinitely many intervals (e.g., paucal applies for to
+ * applies to infinitely many intervals (e.g., paucal applies to
* numbers ending with 2, 3, or 4 except those ending with 12, 13, or
* 14). Thus ChoiceFormat
is not adequate.
*
@@ -47,7 +47,7 @@ import java.util.Set; * conditions for a plural case than just a single interval. These plural * rules define both what plural cases exist in a language, and to * which numbers these cases apply. - *
Ce sont 3 fichiers dans la liste."
*
* Note:
- * Currently (as of Mar 2007), PluralFormat
+ * Currently PluralFormat
* does not make use of quotes like MessageFormat
.
* If you use plural format strings with MessageFormat
and want
* to use a quote sign "'
", you have to write "''
".
@@ -323,7 +323,7 @@ public class PluralFormat extends UFormat {
* for the plural rules.
* Patterns and their interpretation are specified in the class description.
*
- * @param pattern the pattern for this plural format
+ * @param pattern the pattern for this plural format.
* @throws IllegalArgumentException if the pattern is invalid.
* @draft ICU 3.8
* @provisional This API might change or be removed in a future release.
@@ -337,7 +337,7 @@ public class PluralFormat extends UFormat {
// Format string has to include keywords.
// states:
// 0: Reading keyword.
- // 1: Reading value for preceeding keyword.
+ // 1: Reading value for preceding keyword.
int state = 0;
StringBuffer token = new StringBuffer();
String currentKeyword = null;
@@ -416,8 +416,8 @@ public class PluralFormat extends UFormat {
/**
* Formats a plural message for a given number.
*
- * @param number a number for which the plural message should be formatted
- * for. If no pattern has been applied to this
+ * @param number a number for which the plural message should be formatted.
+ * If no pattern has been applied to this
* PluralFormat
object yet, the formatted number will
* be returned.
* @return the string containing the formatted plural message.
@@ -448,7 +448,7 @@ public class PluralFormat extends UFormat {
* Formats a plural message for a given number and appends the formatted
* message to the given StringBuffer
.
* @param number a number object (instance of Number
for which
- * the plural message should be formatted for. If no pattern has been
+ * the plural message should be formatted. If no pattern has been
* applied to this PluralFormat
object yet, the
* formatted number will be returned.
* Note: If this object is not an instance of Number
,
@@ -510,7 +510,7 @@ public class PluralFormat extends UFormat {
* and the NumberFormat is set to the default number format for
* the locale. The resulting format behaves the same as one
* constructed from {@link #PluralFormat(ULocale)}.
- * @param ulocale the ULocale
to use to configure the
+ * @param ulocale the ULocale
used to configure the
* formatter. If ulocale
is null
, the
* default locale will be used.
* @draft ICU 3.8
@@ -527,7 +527,7 @@ public class PluralFormat extends UFormat {
* Sets the number format used by this formatter. You only need to
* call this if you want a different number format than the default
* formatter for the locale.
- * @param format the number format to use
+ * @param format the number format to use.
* @draft ICU 3.8
* @provisional This API might change or be removed in a future release.
*/