Skip to content

Commit 78aaef6

Browse files
Update README.md
1 parent 949b94a commit 78aaef6

File tree

1 file changed

+92
-0
lines changed

1 file changed

+92
-0
lines changed

README.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4075,6 +4075,98 @@ Returns an enumeration of the keys in this table.
40754075

40764076
</ul>
40774077

4078+
<h2></h2>
4079+
<h2 align="Center">ConcurrentHashMap.KeySetView - Inner Class of ConcurrentHashMap </h2>
4080+
4081+
```mermaid
4082+
4083+
sequenceDiagram
4084+
4085+
java.util.concurrent.ConcurrentHashMap->>java.util.ConcurrentHashMap.KeySetView:InnerClass
4086+
java.util.ConcurrentHashMap.KeySetView->>java.util.concurrent.ConcurrentHashMap.CollectionView:extends
4087+
java.util.ConcurrentHashMap.KeySetView->>java.util.Set:implements
4088+
java.util.ConcurrentHashMap.KeySetView->>java.io.Serializable:implements
4089+
4090+
```
4091+
4092+
<h3 align="Center">
4093+
4094+
```Syntax
4095+
4096+
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+
<h3 align="Center">
4117+
4118+
```Syntax
4119+
4120+
abstract static sealed class CollectionView<K,V,E>
4121+
implements Collection<E>, java.io.Serializable permits EntrySetView, KeySetView, ValuesView
4122+
4123+
```
4124+
</h3>
4125+
4126+
<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+
<h3 align="Center">
4131+
4132+
```Syntax
4133+
4134+
static final class EntrySetView<K,V> extends CollectionView<K,V,Map.Entry<K,V>>
4135+
implements Set<Map.Entry<K,V>>, java.io.Serializable
4136+
4137+
```
4138+
</h3>
4139+
4140+
<h3><i><ins> KeySetView Class</ins></i></h3>
4141+
4142+
<h3 align="Center">
4143+
4144+
```Syntax
4145+
4146+
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+
<h3 align="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>
4167+
4168+
</ul>
4169+
40784170
</ul>
40794171
</ul>
40804172

0 commit comments

Comments
 (0)