public static < K , V > MutableList < Pair < K , V > > toListOfPairs ( Map < K , V > map ) { final MutableList < Pair < K , V > > pairs = FastList . newList ( map . size ( ) ) ; MapIterate . forEachKeyValue ( map , new Procedure2 < K , V > ( ) { public void value ( K key , V value ) { pairs . add ( Tuples . pair ( key , value ) ) ; } } ) ; return pairs ; }
Iterate over the specified map applying the specified Function to each value and return the results as a List .