Guava Optional LinkedHashMultimap version?
I want to create an immutable version of LinkedHashMultiMap. I can roll my own using ImmutableMap and ImmutableList, but wondering if there is a way to extend Guava for this. For example, using Forwarding or Supplier.
It's not clear if you want ListMultimap
or SetMultimap
, but you will almost certainly want to ImmutableListMultimap
and ImmutableSetMultimap
accordingly anyway. Like all immutable collections, it will still preserve the insertion order exactly the same as LinkedHashMultimap
.
Guava's unmatched collections are very intentionally non-extensible.