Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RangeMultiMap #3999

Open
belugabehr opened this issue Aug 26, 2020 · 6 comments
Open

Add RangeMultiMap #3999

belugabehr opened this issue Aug 26, 2020 · 6 comments

Comments

@belugabehr
Copy link

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.

@belugabehr
Copy link
Author

#1778

@netdpb
Copy link
Member

netdpb commented Aug 26, 2020

To be clear, is this request distinct from #1778?

@belugabehr
Copy link
Author

belugabehr commented Aug 26, 2020

@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)
}

@mghildiy
Copy link

mghildiy commented Jan 2, 2021

Hi, can I work on this issue?

1 similar comment
@yonghao97
Copy link

Hi, can I work on this issue?

@JanecekPetr
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants