{"action":"created","issue":{"url":"https://api.github.com/repos/google/guava/issues/2035","labels_url":"https://api.github.com/repos/google/guava/issues/2035/labels{/name}","comments_url":"https://api.github.com/repos/google/guava/issues/2035/comments","events_url":"https://api.github.com/repos/google/guava/issues/2035/events","html_url":"https://github.com/google/guava/issues/2035","id":69038583,"number":2035,"title":"Could we add a getFirstValue(K key) method to Multimap and return Optional<V>","user":{"login":"songofsp3","id":10792148,"avatar_url":"https://avatars.githubusercontent.com/u/10792148?v=3","gravatar_id":"","url":"https://api.github.com/users/songofsp3","html_url":"https://github.com/songofsp3","followers_url":"https://api.github.com/users/songofsp3/followers","following_url":"https://api.github.com/users/songofsp3/following{/other_user}","gists_url":"https://api.github.com/users/songofsp3/gists{/gist_id}","starred_url":"https://api.github.com/users/songofsp3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/songofsp3/subscriptions","organizations_url":"https://api.github.com/users/songofsp3/orgs","repos_url":"https://api.github.com/users/songofsp3/repos","events_url":"https://api.github.com/users/songofsp3/events{/privacy}","received_events_url":"https://api.github.com/users/songofsp3/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/google/guava/labels/package:%20collect","name":"package: collect","color":"207de5"},{"url":"https://api.github.com/repos/google/guava/labels/type:%20addition","name":"type: addition","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-17T00:47:22Z","updated_at":"2015-04-17T01:04:28Z","closed_at":"2015-04-17T01:04:28Z","body":"In some cases, I know that there will be at most one value for some key in a multimap, and it is pretty annoying to get the value out by the iterator and then check hasNext() and get by next(), especially if the multimaps are nested in each other.\r\n\r\ncould we wrap it and provide a method on Multimap\r\npublic Optional<V> getFirstValue(K key);\r\nJust return the first Value by Iterator or Absent.\r\n\r\nSimilar to XMLNode.getFirstChild()"},"comment":{"url":"https://api.github.com/repos/google/guava/issues/comments/93871685","html_url":"https://github.com/google/guava/issues/2035#issuecomment-93871685","issue_url":"https://api.github.com/repos/google/guava/issues/2035","id":93871685,"user":{"login":"kluever","id":2036304,"avatar_url":"https://avatars.githubusercontent.com/u/2036304?v=3","gravatar_id":"","url":"https://api.github.com/users/kluever","html_url":"https://github.com/kluever","followers_url":"https://api.github.com/users/kluever/followers","following_url":"https://api.github.com/users/kluever/following{/other_user}","gists_url":"https://api.github.com/users/kluever/gists{/gist_id}","starred_url":"https://api.github.com/users/kluever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kluever/subscriptions","organizations_url":"https://api.github.com/users/kluever/orgs","repos_url":"https://api.github.com/users/kluever/repos","events_url":"https://api.github.com/users/kluever/events{/privacy}","received_events_url":"https://api.github.com/users/kluever/received_events","type":"User","site_admin":false},"created_at":"2015-04-17T01:04:28Z","updated_at":"2015-04-17T01:04:28Z","body":"Also I should mention that changing the Multimap interface is basically a non-starter at this point. It's non-@Beta and it would cause immense pain to all of our open source users."}}