Map.entry interface, you can work with a map entry.
The EntrySet () method declared in the map interface returns a set containing the mapping entries. Each group element is a Map.entry object.
The following table summarizes the methods that the interface declares:
| SN |
Method and Description |
| 1 |
boolean equals (Object obj)
If obj is a map.entry returns true, its key and value are equal to the calling object. |
| 2 |
Object GetKey ()
Returns the key for this mapping entry. |
| 3 |
Object GetValue ()
Returns the value of this mapping entry. |
| 4 |
int Hashcode ()
Returns the hash code for this mapping entry. |
| 5 |
Object SetValue (Object v)
The collection of this mapping entry v . If v is an incorrect type, the mapping throws a ClassCastException exception value. If V is null and the map does not allow the null key, the nullyiibaierexception exception is thrown. A unsupportedoperationexception is thrown if the mapping cannot be changed. |
Example:
The following is an example of how map.entry is used:
Daisy 99.22Qadir: -19.08zara:3434.34ayan:1378.0mahnaz:123.22zara ' s new balance:4434.34
Java Map.entry Interface