You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class ConcurrentHashMap<K,V> extends AbstractMap<K,V>
4097
+
implements ConcurrentMap<K,V>, Serializable {
4098
+
4099
+
......
4100
+
4101
+
public static final class KeySetView<K,V> extends CollectionView<K,V,K>
4102
+
implements Set<K>, java.io.Serializable
4103
+
4104
+
....
4105
+
4106
+
}
4107
+
4108
+
```
4109
+
4110
+
</h3>
4111
+
4112
+
<ul>
4113
+
4114
+
<h3><i> <li>1. CollectionView class is an abstract class of ConcurrentHashMap class which is not viable or be imported to any file . Syntax as follows: </li></i><h3>
4115
+
4116
+
<h3align="Center">
4117
+
4118
+
```Syntax
4119
+
4120
+
abstract static sealed class CollectionView<K,V,E>
<h3><i><li> 2. More Over EntrySetView, KeySetView and ValuesView are "Static Final Classes" and are not viable or be imported to any file. Syntax as follows:</li></i><h3>
4127
+
4128
+
<h3><i><ins>EntrySetView Class</ins></i></h3>
4129
+
4130
+
<h3align="Center">
4131
+
4132
+
```Syntax
4133
+
4134
+
static final class EntrySetView<K,V> extends CollectionView<K,V,Map.Entry<K,V>>
public static final class KeySetView<K,V> extends CollectionView<K,V,K>
4147
+
implements Set<K>, java.io.Serializable
4148
+
4149
+
```
4150
+
</h3>
4151
+
4152
+
<h3><i><ins> ValuesView Class</ins></i></h3>
4153
+
4154
+
<h3align="Center">
4155
+
4156
+
```Syntax
4157
+
4158
+
static final class ValuesView<K,V> extends CollectionView<K,V,V>
4159
+
implements Collection<V>, java.io.Serializable
4160
+
4161
+
```
4162
+
</h3>
4163
+
4164
+
<h3><i><li> 3. CollectionView class, EntrySetView class, KeySetView class and ValuesView class cannot be implemented directly but can be implemented through KeySetView as KeySetView , the inner class of ConcurrentHashMap class inherit those classes along with Set and Serializable interface. </li></i><h3>
4165
+
4166
+
<h3><i><li> 4. The main motive of KeySetView , the inner class of ConcurrentHashMap to store the Keys of the given Map as a Set in a Variable or object created by KeySet class or ConcurrentHashMap.KeySet class. </li></i><h3>
0 commit comments