ICU-11067 documented limitation on modification while iterating

X-SVN-Rev: 36361
This commit is contained in:
Mark Davis 2014-09-05 14:45:21 +00:00
parent b96cdc6199
commit 4a08548070
2 changed files with 8 additions and 1 deletions

View File

@ -4132,6 +4132,8 @@ public class UnicodeSet extends UnicodeFilter implements Iterable<String>, Compa
* The UnicodeSet must not be altered during the iteration.
* The EntryRange is the same each time; the contents are just reset.<br>
* <b>Warning: </b>To iterate over the full contents, you have to also iterate over the strings.
* <p><b>Warning: </b>For speed, UnicodeSet iteration does not check for concurrent modification.
* Do not alter the UnicodeSet while iterating.
*
* <pre>
* // Sample code
@ -4180,6 +4182,8 @@ public class UnicodeSet extends UnicodeFilter implements Iterable<String>, Compa
/**
* Returns a string iterator. Uses the same order of iteration as {@link UnicodeSetIterator}.
* <p><b>Warning: </b>For speed, UnicodeSet iteration does not check for concurrent modification.
* Do not alter the UnicodeSet while iterating.
* @see java.util.Set#iterator()
* @stable ICU 4.4
*/

View File

@ -32,6 +32,8 @@ import java.util.Iterator;
* }
* }
* </pre>
* <p><b>Warning: </b>For speed, UnicodeSet iteration does not check for concurrent modification.
* Do not alter the UnicodeSet while iterating.
* @author M. Davis
* @stable ICU 2.0
*/
@ -104,7 +106,8 @@ public class UnicodeSetIterator {
* calls to <tt>next()</tt> and <tt>nextRange()</tt> without
* calling <tt>reset()</tt> between them. The results of doing so
* are undefined.
*
* <p><b>Warning: </b>For speed, UnicodeSet iteration does not check for concurrent modification.
* Do not alter the UnicodeSet while iterating.
* @return true if there was another element in the set and this
* object contains the element.
* @stable ICU 2.0