This seems like a problem in iterator design. STL may share same property.



所有跟贴·加跟贴·新语丝科技论坛

送交者: AA 于 2005-11-15, 08:28:48:

回答: Java HashSet Problem. 由 松鼠 于 2005-11-10, 00:21:15:

Without looking into the Collection implementation detail, I guess this can be an area for improvement. There are some programming rules or patterns for programmer to follow with iterator, but the problem you met is not much reasonable, esp. the exception it throws is really misleading because there is no concurrent accesses to the set at all, although we can understand that's because you remove element with set, and access it with another pointer.



所有跟贴:


加跟贴

笔名: 密码(可选项): 注册笔名请按这里

标题:

内容(可选项):

URL(可选项):
URL标题(可选项):
图像(可选项):


所有跟贴·加跟贴·新语丝科技论坛