Java collections framework: Difference between revisions

Content deleted Content added
sychronized->synchronized, sychronization->synchronization
Line 215:
=====CopyOnWriteArraySet class=====
{{code|CopyOnWriteArraySet}} is a concurrent replacement for a synchronized {{java|Set}}. It provides improved concurrency in many situations by removing the need to perform synchronization or making a copy of the object during iteration, similar to how {{code|CopyOnWriteArrayList}} acts as the concurrent replacement for a synchronized {{java|List}}.{{sfn|Goetz|Peierls|Bloch|Bowbeer|2006|loc=§5.2.3 CopyOnWriteArrayList|pp=86-89}}
On the other hand, similar to {{code|CopyOnWriteArrayList}}, {{code|CopyOnWriteArraySet}} should not be used when sychronizationsynchronization is mandatory.
 
===SortedSet interface===
Line 227:
 
=====ConcurrentSkipListSet class=====
{{code|ConcurrentSkipListSet}} acts as a concurrent replacement for implementations of a synchronized {{java|SortedSet}}. For example it replaces a {{java|TreeSet}} that has been wrapped by the {{java|sychronizedMapsynchronizedMap}} method. {{sfn|Goetz|Peierls|Bloch|Bowbeer|2006|loc=§5.2 ConcurrentCollections|pp=84-85}}
 
==Map interfaces==
Line 261:
 
=====ConcurrentSkipListMap class=====
{{code|ConcurrentSkipListMap }} acts as a concurrent replacement for implementations of a synchronized {{java|SortedMap}}. {{code|ConcurrentSkipListMap }} is very similar to {{code|ConcurrentSkipListSet}}, since {{code|ConcurrentSkipListMap }} replaces a {{java|TreeMap}} that has been wrapped by the {{java|sychronizedMapsynchronizedMap}} method.{{sfn|Goetz|Peierls|Bloch|Bowbeer|2006|loc=§5.2 ConcurrentCollections|pp=84-85}}
 
===Map subinterfaces===