At one point in my code, I created a Set<Map.Entry<K, V>>
from a map. Now I want to recreate the same map form, so I want to convert the HashSet<Map.Entry<K, V>>
back into a HashMap<K, V>
. Does Java have a native call for doing this, or do I have to loop over the set elements and build the map up manually?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…