![]() The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. Set> entrySet(): Returns a Set view of the mappings contained in this map.It does not support the add or addAll operations. The collection supports element removal, which removes the corresponding mapping from the map, via the Iterator.remove, Collection.remove, removeAll, retainAll and clear operations. If the map is modified while an iteration over the collection is in progress (except through the iterator’s own remove operation), the results of the iteration are undefined. The collection is backed by the map, so changes to the map are reflected in the collection, and vice-versa. Collection values(): Returns a Collection view of the values contained in this map. ![]() The set supports element removal, which removes the corresponding mapping from the map, via the Iterator.remove, Set.remove, removeAll, retainAll, and clear operations. 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. Set keySet(): Returns a Set view of the keys contained in this map.Map interface provides three collection views:
0 Comments
Leave a Reply. |