Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Guava ImmutableSortedSetMultimap?

Google Guava has a SortedSetMultimap. Wonderful. Now where is the immutable version? There exists an ImmutableSetMultimap. But what about ImmutableSortedSetMultimap? (Please don't reply with "Why do you want one?")

like image 671
Garret Wilson Avatar asked Jan 09 '23 20:01

Garret Wilson


1 Answers

It won't actually implement SortedSetMultimap, but ImmutableSetMultimap.Builder has an orderValuesBy(Comparator) method that you can use, which has the effect that the value collections are ImmutableSortedSets.

like image 188
Louis Wasserman Avatar answered Jan 18 '23 01:01

Louis Wasserman