I’d like to create new item that similarly to Util.Map.Entry that will contain the structure key, value.
The problem is that I can’t instantiate a Map.Entry because it’s an interface.
Does anyone know how to create a new generic key/value object for Map.Entry?
You can just implement the
Map.Entry<K, V>interface yourself:And then use it: