{"action":"closed","issue":{"url":"https://api.github.com/repos/amaembo/streamex/issues/41","labels_url":"https://api.github.com/repos/amaembo/streamex/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/amaembo/streamex/issues/41/comments","events_url":"https://api.github.com/repos/amaembo/streamex/issues/41/events","html_url":"https://github.com/amaembo/streamex/issues/41","id":122472234,"number":41,"title":"Add StreamEx.without(T...) and primitive friends","user":{"login":"amaembo","id":5114450,"avatar_url":"https://avatars.githubusercontent.com/u/5114450?v=3","gravatar_id":"","url":"https://api.github.com/users/amaembo","html_url":"https://github.com/amaembo","followers_url":"https://api.github.com/users/amaembo/followers","following_url":"https://api.github.com/users/amaembo/following{/other_user}","gists_url":"https://api.github.com/users/amaembo/gists{/gist_id}","starred_url":"https://api.github.com/users/amaembo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amaembo/subscriptions","organizations_url":"https://api.github.com/users/amaembo/orgs","repos_url":"https://api.github.com/users/amaembo/repos","events_url":"https://api.github.com/users/amaembo/events{/privacy}","received_events_url":"https://api.github.com/users/amaembo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/amaembo/streamex/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/amaembo/streamex/milestones/10","html_url":"https://github.com/amaembo/streamex/milestones/0.5.5","labels_url":"https://api.github.com/repos/amaembo/streamex/milestones/10/labels","id":1552691,"number":10,"title":"0.5.5","description":null,"creator":{"login":"amaembo","id":5114450,"avatar_url":"https://avatars.githubusercontent.com/u/5114450?v=3","gravatar_id":"","url":"https://api.github.com/users/amaembo","html_url":"https://github.com/amaembo","followers_url":"https://api.github.com/users/amaembo/followers","following_url":"https://api.github.com/users/amaembo/following{/other_user}","gists_url":"https://api.github.com/users/amaembo/gists{/gist_id}","starred_url":"https://api.github.com/users/amaembo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amaembo/subscriptions","organizations_url":"https://api.github.com/users/amaembo/orgs","repos_url":"https://api.github.com/users/amaembo/repos","events_url":"https://api.github.com/users/amaembo/events{/privacy}","received_events_url":"https://api.github.com/users/amaembo/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":2,"state":"open","created_at":"2016-01-30T11:08:35Z","updated_at":"2016-02-01T08:17:12Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-12-16T10:26:45Z","updated_at":"2016-02-01T08:17:12Z","closed_at":"2016-02-01T08:17:12Z","body":"Currently there are `StreamEx.without(T)`, `IntStreamEx.without(int)` and `LongStreamEx.without(long)` methods. It would be nice addition to allow specifying several values with var-args:\r\n\r\n    StreamEx#without(T...)\r\n    IntStreamEx#without(int...)\r\n    LongStreamEx#without(long...)\r\n\r\nThere are some open questions though as discussed in #40 (copied):\r\n\r\nThe main problem here is the computational difficulty. The simplest solution is to perform the linear scan of the supplied array for every stream element which will make the overall difficulty as `O(n*m)` where `n` is the number of stream elements and `m` is the array length. Having such method might encourage users to use it instead of manually converting the input to the efficient data structure. For example, use might have long `String[]` array. Currently user might write:\r\n\r\n    String[] toExclude = ...\r\n    Set<String> excludeSet = new HashSet<>(Arrays.asList(toExclude));\r\n    result = StreamEx.of(something).remove(excludeSet::contains).toList();\r\n\r\nAfter the proposed change user will be able to write:\r\n\r\n    String[] toExclude = ...\r\n    StreamEx.of(something).without(toExclude).toList();\r\n\r\nWhile this is shorter, it would be less efficient. Or should we create a `HashSet` internally (making the method early-binding)? This way we should require the consistent `hashCode/equals` implementation (and `compareTo` if it's comparable as `HashSet` may use it!). Or should we create a `HashSet` only if array size is bigger than some threshold? And what about primitive case? If user has some library with primitive sets (like Trove or Koloboke), he may create an efficient set and use it with `remove`. The StreamEx library cannot use such collections (and it probably would be too much to implement `IntSet`/`LongSet` internally, though this could be discussed). So should we use `HashSet<Integer>` and `HashSet<Long>` boxed sets in these cases?\r\n\r\n* [x] Draft implementation\r\n* [x] JavaDoc\r\n* [x] Tests\r\n* [x] Changes\r\n* [x] Cheatsheet"}}