guava
guava copied to clipboard
Add RangeMultiMap
Please consider adding a RangeMultiMap to compliment RangeMap.
One of the restrictions of RangeMap is that it only supports disjoint nonempty ranges. I would like to have access to a RangeMultiMap to track event times. Events can take place on a Range of dates. I would like to be able to supply a single date and get back a list of all the events that were occurring during that date.
#1778
To be clear, is this request distinct from #1778?
@netdpb I do not think it's the same. I think it may be related though. I am looking for a Map:
interface RangeMultiMap <K extends Comparable, V>
{
int size();
boolean isEmpty();
...
// Returns all values which have a range that contains Key
Collection<V> get(K key)
// Returns all values which have a range that overlaps with key (can combine method by using Range.singleton(C))
Collection<V> get(Range<K> key)
}
Hi, can I work on this issue?
Hi, can I work on this issue?
Hi, can I work on this issue?
Probably not. Guava does not usually accept much code via PRs, especially not when a new API is involved. And especially especially not if it's not clear the proposed thing is something the Google team even wants in their library. in this specific case, there's an ongoing discussion about this being similar to #1778.
Ergo, first finish the discussion, then think about coding things up. You're unlikely to get things into Guava nowadays.