{"action":"created","issue":{"url":"https://api.github.com/repos/javaslang/javaslang/issues/1316","repository_url":"https://api.github.com/repos/javaslang/javaslang","labels_url":"https://api.github.com/repos/javaslang/javaslang/issues/1316/labels{/name}","comments_url":"https://api.github.com/repos/javaslang/javaslang/issues/1316/comments","events_url":"https://api.github.com/repos/javaslang/javaslang/issues/1316/events","html_url":"https://github.com/javaslang/javaslang/issues/1316","id":152785789,"number":1316,"title":"Add `isNotEmpty` to `Traversable`","user":{"login":"paplorinc","id":1841944,"avatar_url":"https://avatars.githubusercontent.com/u/1841944?v=3","gravatar_id":"","url":"https://api.github.com/users/paplorinc","html_url":"https://github.com/paplorinc","followers_url":"https://api.github.com/users/paplorinc/followers","following_url":"https://api.github.com/users/paplorinc/following{/other_user}","gists_url":"https://api.github.com/users/paplorinc/gists{/gist_id}","starred_url":"https://api.github.com/users/paplorinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paplorinc/subscriptions","organizations_url":"https://api.github.com/users/paplorinc/orgs","repos_url":"https://api.github.com/users/paplorinc/repos","events_url":"https://api.github.com/users/paplorinc/events{/privacy}","received_events_url":"https://api.github.com/users/paplorinc/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/javaslang/javaslang/labels/feature","name":"feature","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/javaslang/javaslang/milestones/20","html_url":"https://github.com/javaslang/javaslang/milestones/2.1.0","labels_url":"https://api.github.com/repos/javaslang/javaslang/milestones/20/labels","id":1294243,"number":20,"title":"2.1.0","description":"Boost up collection performance","creator":{"login":"danieldietrich","id":743833,"avatar_url":"https://avatars.githubusercontent.com/u/743833?v=3","gravatar_id":"","url":"https://api.github.com/users/danieldietrich","html_url":"https://github.com/danieldietrich","followers_url":"https://api.github.com/users/danieldietrich/followers","following_url":"https://api.github.com/users/danieldietrich/following{/other_user}","gists_url":"https://api.github.com/users/danieldietrich/gists{/gist_id}","starred_url":"https://api.github.com/users/danieldietrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danieldietrich/subscriptions","organizations_url":"https://api.github.com/users/danieldietrich/orgs","repos_url":"https://api.github.com/users/danieldietrich/repos","events_url":"https://api.github.com/users/danieldietrich/events{/privacy}","received_events_url":"https://api.github.com/users/danieldietrich/received_events","type":"User","site_admin":false},"open_issues":62,"closed_issues":61,"state":"open","created_at":"2015-09-07T18:46:28Z","updated_at":"2016-06-19T14:39:32Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2016-05-03T14:21:47Z","updated_at":"2016-06-21T10:41:58Z","closed_at":null,"body":"Similarly to how `Option` has\r\n```java\r\ndefault boolean isDefined() {\r\n    return !isEmpty();\r\n}\r\n```\r\nwe may add the opposite of `isEmpty`, as `Java`'s `!` operator is hard to see (especially before an `i`)\r\n```java\r\n/**\r\n * Checks if this Traversable is not empty.\r\n *\r\n * @return whether this Traversable contains any elements.\r\n */\r\ndefault boolean isNotEmpty() {\r\n    return !isEmpty();\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/javaslang/javaslang/issues/comments/227403901","html_url":"https://github.com/javaslang/javaslang/issues/1316#issuecomment-227403901","issue_url":"https://api.github.com/repos/javaslang/javaslang/issues/1316","id":227403901,"user":{"login":"danieldietrich","id":743833,"avatar_url":"https://avatars.githubusercontent.com/u/743833?v=3","gravatar_id":"","url":"https://api.github.com/users/danieldietrich","html_url":"https://github.com/danieldietrich","followers_url":"https://api.github.com/users/danieldietrich/followers","following_url":"https://api.github.com/users/danieldietrich/following{/other_user}","gists_url":"https://api.github.com/users/danieldietrich/gists{/gist_id}","starred_url":"https://api.github.com/users/danieldietrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danieldietrich/subscriptions","organizations_url":"https://api.github.com/users/danieldietrich/orgs","repos_url":"https://api.github.com/users/danieldietrich/repos","events_url":"https://api.github.com/users/danieldietrich/events{/privacy}","received_events_url":"https://api.github.com/users/danieldietrich/received_events","type":"User","site_admin":false},"created_at":"2016-06-21T10:41:58Z","updated_at":"2016-06-21T10:41:58Z","body":"@valery1707 you are completely right. This issue can be closed.\r\n\r\nValue has isEmpty and isDefined. The latter is meant to reflect the non-empty state, especially for single-valued types.\r\n\r\nTraversable inherits isEmpty and isDefined and adds nonEmpty for multi-valued types.\r\n\r\nThese method names are common in Scala.\r\n\r\n@paplorinc I have to admit that I forgot to mention that we have nonEmpty already. Sorry! The point in the comment you are referring is, that we do not need additional API (with non-empty semantics) within the internal, non-Traversable collections like HashArrayMappedTrie or RedBlackTree.\r\n\r\nThank you for your engagement and keep up the great work!"}}
{"actor":{"display_login":"danieldietrich"}}