{"action":"created","issue":{"url":"https://api.github.com/repos/samtools/htsjdk/issues/178","labels_url":"https://api.github.com/repos/samtools/htsjdk/issues/178/labels{/name}","comments_url":"https://api.github.com/repos/samtools/htsjdk/issues/178/comments","events_url":"https://api.github.com/repos/samtools/htsjdk/issues/178/events","html_url":"https://github.com/samtools/htsjdk/issues/178","id":58610884,"number":178,"title":"Refactor Filters to be functional interface","user":{"login":"lbergelson","id":4700332,"avatar_url":"https://avatars.githubusercontent.com/u/4700332?v=3","gravatar_id":"","url":"https://api.github.com/users/lbergelson","html_url":"https://github.com/lbergelson","followers_url":"https://api.github.com/users/lbergelson/followers","following_url":"https://api.github.com/users/lbergelson/following{/other_user}","gists_url":"https://api.github.com/users/lbergelson/gists{/gist_id}","starred_url":"https://api.github.com/users/lbergelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lbergelson/subscriptions","organizations_url":"https://api.github.com/users/lbergelson/orgs","repos_url":"https://api.github.com/users/lbergelson/repos","events_url":"https://api.github.com/users/lbergelson/events{/privacy}","received_events_url":"https://api.github.com/users/lbergelson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-23T16:33:35Z","updated_at":"2015-02-23T17:08:27Z","closed_at":null,"body":"Currently filters implement 2 different functions, a filter on a single `SAMRecord` and a filter on 2 mated `SAMRecords`.\r\n\r\nThis should be reduced to just a single method that takes 1 `SAMRead`.  Classes that need a mate pair filter can build their own, or filters that are need for mated pairs could implement their own `MateFilter` interface.   In almost all cases the result on mates is just `&&` or `||` of the primary filter, it's easy to compose these.  It would also eliminate many filters throwing `UnimplementedOperation` exceptions. \r\n\r\nThis would make #177 easier since filters would then fit into the standard notion of what a filter or predicate is. "},"comment":{"url":"https://api.github.com/repos/samtools/htsjdk/issues/comments/75585241","html_url":"https://github.com/samtools/htsjdk/issues/178#issuecomment-75585241","issue_url":"https://api.github.com/repos/samtools/htsjdk/issues/178","id":75585241,"user":{"login":"lbergelson","id":4700332,"avatar_url":"https://avatars.githubusercontent.com/u/4700332?v=3","gravatar_id":"","url":"https://api.github.com/users/lbergelson","html_url":"https://github.com/lbergelson","followers_url":"https://api.github.com/users/lbergelson/followers","following_url":"https://api.github.com/users/lbergelson/following{/other_user}","gists_url":"https://api.github.com/users/lbergelson/gists{/gist_id}","starred_url":"https://api.github.com/users/lbergelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lbergelson/subscriptions","organizations_url":"https://api.github.com/users/lbergelson/orgs","repos_url":"https://api.github.com/users/lbergelson/repos","events_url":"https://api.github.com/users/lbergelson/events{/privacy}","received_events_url":"https://api.github.com/users/lbergelson/received_events","type":"User","site_admin":false},"created_at":"2015-02-23T17:08:27Z","updated_at":"2015-02-23T17:08:27Z","body":"Yes, but not in java 6."}}