Skip to content

Commit

Permalink
ImmutableMap.Builder
Browse files Browse the repository at this point in the history
  • Loading branch information
AlessandroPatti committed May 25, 2022
1 parent 0fcec63 commit 462f796
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -562,11 +562,11 @@ public Map<KeyT, ValueT> convert(Object x, Object what, Object context)

@Override
public Map<KeyT, ValueT> concat(Iterable<Map<KeyT, ValueT>> iterable) {
LinkedHashMap<KeyT, ValueT> output = new LinkedHashMap<>();
ImmutableMap.Builder<KeyT, ValueT> output = new ImmutableMap.Builder<>();
for (Map<KeyT, ValueT> map: iterable){
output.putAll(map);
}
return ImmutableMap.copyOf(output);
return output.buildKeepingLast();
}

@Override
Expand Down

0 comments on commit 462f796

Please sign in to comment.