Has anyone used TreeMultimap in Google Collections? I understand that using TreeMultimap, its keys and values ββare ordered by their natural order or by the provided comparators. I was wondering if there is a function that allows the user to provide a key and returns all values ββwhose keys are larger than the key provided by the user. This can be done using SortedMap in Java, which has a feature called tailMap. Thanks!
I did not use the TreeMultiMap class, but a quick look at Javadoc suggests that you can use the asMap () method to get a SortedMap, and then call the tailMap () function.
Yes, I did TreeMultimap.asMap () returned SortedMap to support such cases.
Remember that tailMap () returns all records whose keys are greater than or equal to the provided key. The initial question said simply "more."