I am dealing with autogenerated protobuf classes as the value in my TreeBidiMap. That means that they cannot implement Comparable. But building a Comparator for them would be trivial. Is there an implementation for TreeBidiMap that works with Comparators and doesn't require their Keys and Values to implement Comparable? And if not, is there a good reason for that?
My requirements are fairly simple:
A Map, that is sorted by it's value.
But I feel like I have to bend over backwards to achieve this. Currently looking into TreeMultimap to potentially achieve this.