首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

Map的keyset回到的set的功能是受限制的

2012-12-24 
Map的keyset返回的set的功能是受限制的Map的keyset返回的set的功能是受限制的?不能add,addALL可以remove,

Map的keyset返回的set的功能是受限制的

Map的keyset返回的set的功能是受限制的

?

不能add,addALL

可以remove, removeAll, retainAll, clear

?

?

Returns a Set view of the keys contained in this map. The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. If the map is modified while an iteration over the set is in progress (except through the iterator's own remove operation), the results of the iteration are undefined. The set supports element removal, which removes the corresponding mapping from the map, via the Iterator.remove, Set.remove, removeAll, retainAll, and clear operations. It does not support the add or addAll operations.

热点排行