如何转换Map<X, Map<Y,Z>>
为Map<Y, Map<X,Z>>
使用 Java8 流。
输入:
{A : {B : C, D : E}} // Here B and D are the Key of inner map for A key
{F : {B : G, D : H}} // Here B and D are the Key of inner map for F key
输出:
{B : {A : C, F : G}} // Here A and F are the Key of inner map for B key
{D : {A : E, F : H}} // Here A and F are the Key of inner map for D key