{"action":"created","issue":{"url":"https://api.github.com/repos/google/guava/issues/604","labels_url":"https://api.github.com/repos/google/guava/issues/604/labels{/name}","comments_url":"https://api.github.com/repos/google/guava/issues/604/comments","events_url":"https://api.github.com/repos/google/guava/issues/604/events","html_url":"https://github.com/google/guava/issues/604","id":47420108,"number":604,"title":"Wanted in Collections2: Collection<T> filter(Collection<?>, Class<T>)","user":{"login":"gissuebot","id":8091570,"avatar_url":"https://avatars.githubusercontent.com/u/8091570?v=3","gravatar_id":"","url":"https://api.github.com/users/gissuebot","html_url":"https://github.com/gissuebot","followers_url":"https://api.github.com/users/gissuebot/followers","following_url":"https://api.github.com/users/gissuebot/following{/other_user}","gists_url":"https://api.github.com/users/gissuebot/gists{/gist_id}","starred_url":"https://api.github.com/users/gissuebot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gissuebot/subscriptions","organizations_url":"https://api.github.com/users/gissuebot/orgs","repos_url":"https://api.github.com/users/gissuebot/repos","events_url":"https://api.github.com/users/gissuebot/events{/privacy}","received_events_url":"https://api.github.com/users/gissuebot/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/status:%20research","name":"status: research","color":"bfe5bf"},{"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":10,"created_at":"2014-10-31T17:17:38Z","updated_at":"2015-04-15T18:58:34Z","closed_at":"2015-04-15T18:58:34Z","body":"_[Original issue](https://code.google.com/p/guava-libraries/issues/detail?id=604) created by **jaredjacobs** on 2011-04-14 at 07:26 PM_\n\n---\n\nThere is a corollary in Iterables. Was it omitted from Collections2 intentionally?\n\nI see the warning in the Javadoc for Collections2.filter(Collection, Predicate), but it's unclear to me why it says the predicate *must* be consistent with equals. The referenced Javadoc for Predicate.apply specifically says that consistency with equals is *not* an absolute requirement. I've re-read the Javadoc for Collection and nothing there indicates that it has any \"equals\" requirements that would justify a different policy for applying predicates than what you have for Iterable.\n\nIf the omission was intentional, was it because you consider Iterables.filter(Iterable, Class) a mistake? I hope not. It's useful, and a corresponding method in Collections2 would be too.\n\nIf you decide not to implement the method I'm suggesting, I hope you will at least clarify your Javadoc to make it clear why it's missing. Thanks."},"comment":{"url":"https://api.github.com/repos/google/guava/issues/comments/93532257","html_url":"https://github.com/google/guava/issues/604#issuecomment-93532257","issue_url":"https://api.github.com/repos/google/guava/issues/604","id":93532257,"user":{"login":"kevinb9n","id":934551,"avatar_url":"https://avatars.githubusercontent.com/u/934551?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinb9n","html_url":"https://github.com/kevinb9n","followers_url":"https://api.github.com/users/kevinb9n/followers","following_url":"https://api.github.com/users/kevinb9n/following{/other_user}","gists_url":"https://api.github.com/users/kevinb9n/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinb9n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinb9n/subscriptions","organizations_url":"https://api.github.com/users/kevinb9n/orgs","repos_url":"https://api.github.com/users/kevinb9n/repos","events_url":"https://api.github.com/users/kevinb9n/events{/privacy}","received_events_url":"https://api.github.com/users/kevinb9n/received_events","type":"User","site_admin":false},"created_at":"2015-04-15T18:58:34Z","updated_at":"2015-04-15T18:58:34Z","body":"There's been no activity on this for four years, and we're not especially inclined to add more functional-ish features at this time.  The two main workarounds will have to do\r\n\r\n1. Use Iterables.filter(Iterable, Class) and copy\r\n2. Use Collections2.filter(Collection, Predicate) and cast"}}