copy
Creates a shallow copy of the current SynchronizedMap
.
This method returns a new SynchronizedMap
instance containing the same key-value pairs as the original map. The new map is initialized with a copy of the entries of the original map, but it operates independently.
The copy operation is thread-safe and ensures that the new map will have the same entries as the original map at the time of copying, but subsequent modifications to the original map will not affect the copied map.
Return
A new SynchronizedMap
instance containing the same key-value pairs as the original map.