]> granicus.if.org Git - icu/commitdiff
ICU-13447 Document RBBI: getRuleStatus() behavior when going past the end of the...
authorAndy Heninger <andy.heninger@gmail.com>
Tue, 5 Dec 2017 22:56:31 +0000 (22:56 +0000)
committerAndy Heninger <andy.heninger@gmail.com>
Tue, 5 Dec 2017 22:56:31 +0000 (22:56 +0000)
X-SVN-Rev: 40700

icu4c/source/common/unicode/brkiter.h
icu4c/source/common/unicode/rbbi.h
icu4j/main/classes/core/src/com/ibm/icu/text/BreakIterator.java
icu4j/main/classes/core/src/com/ibm/icu/text/RuleBasedBreakIterator.java

index c64bb712222c6346e8da32f144c4419191f2e119..77d7a85fa8190e0ae1ffcc2e68c823c4338341e3 100644 (file)
@@ -298,15 +298,14 @@ public:
     virtual int32_t next(int32_t n) = 0;
 
    /**
-     * For RuleBasedBreakIterators, return the status tag from the
-     * break rule that determined the most recently
-     * returned break position.
+     * For RuleBasedBreakIterators, return the status tag from the break rule
+     * that determined the boundary at the current iteration position.
      * <p>
      * For break iterator types that do not support a rule status,
      * a default value of 0 is returned.
      * <p>
-     * @return the status from the break rule that determined the most recently
-     *         returned break position.
+     * @return the status from the break rule that determined the boundary at
+     *         the current iteration position.
      * @see RuleBaseBreakIterator::getRuleStatus()
      * @see UWordBreak
      * @stable ICU 52
@@ -315,7 +314,7 @@ public:
 
    /**
     * For RuleBasedBreakIterators, get the status (tag) values from the break rule(s)
-    * that determined the most recently returned break position.
+    * that determined the boundary at the current iteration position.
     * <p>
     * For break iterator types that do not support rule status,
     * no values are returned.
@@ -334,7 +333,7 @@ public:
     *                  normal way, without attempting to store any values.
     * @param status    receives error codes.
     * @return          The number of rule status values from rules that determined
-    *                  the most recent boundary returned by the break iterator.
+    *                  the boundary at the current iteration position.
     *                  In the event of a U_BUFFER_OVERFLOW_ERROR, the return value
     *                  is the total number of status values that were available,
     *                  not the reduced number that were actually returned.
index 521e502f1190cc8aea31fbf11134aefd83d4c5d5..a0c1f90415c87f3874bd7fe25683a783399b6f80 100644 (file)
@@ -471,8 +471,8 @@ public:
 
 
     /**
-     * Return the status tag from the break rule that determined the most recently
-     * returned break position.  For break rules that do not specify a
+     * Return the status tag from the break rule that determined the boundary at
+     * the current iteration position.  For break rules that do not specify a
      * status, a default value of 0 is returned.  If more than one break rule
      * would cause a boundary to be located at some position in the text,
      * the numerically largest of the applicable status values is returned.
@@ -492,13 +492,8 @@ public:
      * When creating custom break rules, one is free to define whatever
      * status values may be convenient for the application.
      * <p>
-     * Note: this function is not thread safe.  It should not have been
-     *       declared const, and the const remains only for compatibility
-     *       reasons.  (The function is logically const, but not bit-wise const).
-     *   TODO: check this. Probably thread safe now.
-     * <p>
-     * @return the status from the break rule that determined the most recently
-     * returned break position.
+     * @return the status from the break rule that determined the boundary
+     * at the current iteration position.
      *
      * @see UWordBreak
      * @stable ICU 2.2
@@ -506,8 +501,8 @@ public:
     virtual int32_t getRuleStatus() const;
 
    /**
-    * Get the status (tag) values from the break rule(s) that determined the most
-    * recently returned break position.
+    * Get the status (tag) values from the break rule(s) that determined the boundary
+    * at the current iteration position.
     * <p>
     * The returned status value(s) are stored into an array provided by the caller.
     * The values are stored in sorted (ascending) order.
@@ -520,8 +515,8 @@ public:
     *                  the function to return the number of status values, in the
     *                  normal way, without attemtping to store any values.
     * @param status    receives error codes.
-    * @return          The number of rule status values from rules that determined
-    *                  the most recent boundary returned by the break iterator.
+    * @return          The number of rule status values from the rules that determined
+    *                  the boundary at the current iteration position.
     *                  In the event of a U_BUFFER_OVERFLOW_ERROR, the return value
     *                  is the total number of status values that were available,
     *                  not the reduced number that were actually returned.
index 451b8c0ea769f9a895cb021962e8d3b8269887d0..67f6048eecce7c8b50faa259de42d8c3aaf0a5c2 100644 (file)
@@ -445,14 +445,13 @@ public abstract class BreakIterator implements Cloneable
 
     /**
      * For RuleBasedBreakIterators, return the status tag from the
-     * break rule that determined the most recently
-     * returned break position.
+     * break rule that determined the boundary at the current iteration position.
      * <p>
      * For break iterator types that do not support a rule status,
      * a default value of 0 is returned.
      * <p>
-     * @return The status from the break rule that determined the most recently
-     *         returned break position.
+     * @return The status from the break rule that determined the boundary
+     * at the current iteration position.
      *
      * @stable ICU 52
      */
@@ -463,7 +462,7 @@ public abstract class BreakIterator implements Cloneable
 
     /**
      * For RuleBasedBreakIterators, get the status (tag) values from the break rule(s)
-     * that determined the most recently returned break position.
+     * that determined the the boundary at the current iteration position.
      * <p>
      * For break iterator types that do not support rule status,
      * no values are returned.
@@ -474,7 +473,7 @@ public abstract class BreakIterator implements Cloneable
      *
      * @param fillInArray an array to be filled in with the status values.
      * @return          The number of rule status values from rules that determined
-     *                  the most recent boundary returned by the break iterator.
+     *                  the the boundary at the current iteration position.
      *                  In the event that the array is too small, the return value
      *                  is the total number of status values that were available,
      *                  not the reduced number that were actually returned.
index 28286ec975171febb8357342ba45faab411f3298..b39aad503dbfe7442e466a283b922fd6e43a0679 100644 (file)
@@ -546,8 +546,8 @@ public class RuleBasedBreakIterator extends BreakIterator {
 
 
     /**
-     * Return the status tag from the break rule that determined the most recently
-     * returned break position.  The values appear in the rule source
+     * Return the status tag from the break rule that determined the boundary at
+     * the current iteration position.  The values appear in the rule source
      * within brackets, {123}, for example.  For rules that do not specify a
      * status, a default value of 0 is returned.  If more than one rule applies,
      * the numerically largest of the possible status values is returned.
@@ -561,8 +561,8 @@ public class RuleBasedBreakIterator extends BreakIterator {
      * position from <code>next()</code>, <code>previous()</code>, or
      * any other break iterator functions that returns a boundary position.
      * <p>
-     * @return the status from the break rule that determined the most recently
-     * returned break position.
+     * @return the status from the break rule that determined the boundary
+     * at the current iteration position.
      *
      * @stable ICU 60
      */
@@ -583,8 +583,8 @@ public class RuleBasedBreakIterator extends BreakIterator {
     }
 
     /**
-     * Get the status (tag) values from the break rule(s) that determined the most
-     * recently returned break position.  The values appear in the rule source
+     * Get the status (tag) values from the break rule(s) that determined the boundary
+     * at the current iteration position.  The values appear in the rule source
      * within brackets, {123}, for example.  The default status value for rules
      * that do not explicitly provide one is zero.
      * <p>
@@ -596,8 +596,8 @@ public class RuleBasedBreakIterator extends BreakIterator {
      *  will be thrown.
      *
      * @param fillInArray an array to be filled in with the status values.
-     * @return          The number of rule status values from rules that determined
-     *                  the most recent boundary returned by the break iterator.
+     * @return          The number of rule status values from the rules that determined
+     *                  the boundary at the current iteration position.
      *                  In the event that the array is too small, the return value
      *                  is the total number of status values that were available,
      *                  not the reduced number that were actually returned.