{"action":"created","issue":{"url":"https://api.github.com/repos/yegor256/cactoos/issues/110","repository_url":"https://api.github.com/repos/yegor256/cactoos","labels_url":"https://api.github.com/repos/yegor256/cactoos/issues/110/labels{/name}","comments_url":"https://api.github.com/repos/yegor256/cactoos/issues/110/comments","events_url":"https://api.github.com/repos/yegor256/cactoos/issues/110/events","html_url":"https://github.com/yegor256/cactoos/pull/110","id":235366546,"number":110,"title":"#109 LimitedIterable","user":{"login":"dusan-rychnovsky","id":5459795,"avatar_url":"https://avatars2.githubusercontent.com/u/5459795?v=3","gravatar_id":"","url":"https://api.github.com/users/dusan-rychnovsky","html_url":"https://github.com/dusan-rychnovsky","followers_url":"https://api.github.com/users/dusan-rychnovsky/followers","following_url":"https://api.github.com/users/dusan-rychnovsky/following{/other_user}","gists_url":"https://api.github.com/users/dusan-rychnovsky/gists{/gist_id}","starred_url":"https://api.github.com/users/dusan-rychnovsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dusan-rychnovsky/subscriptions","organizations_url":"https://api.github.com/users/dusan-rychnovsky/orgs","repos_url":"https://api.github.com/users/dusan-rychnovsky/repos","events_url":"https://api.github.com/users/dusan-rychnovsky/events{/privacy}","received_events_url":"https://api.github.com/users/dusan-rychnovsky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-06-12T21:09:40Z","updated_at":"2017-06-13T18:38:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/yegor256/cactoos/pulls/110","html_url":"https://github.com/yegor256/cactoos/pull/110","diff_url":"https://github.com/yegor256/cactoos/pull/110.diff","patch_url":"https://github.com/yegor256/cactoos/pull/110.patch"},"body":"Add LimitedIterable - an analogy Iterables.limit from Guava."},"comment":{"url":"https://api.github.com/repos/yegor256/cactoos/issues/comments/308209355","html_url":"https://github.com/yegor256/cactoos/pull/110#issuecomment-308209355","issue_url":"https://api.github.com/repos/yegor256/cactoos/issues/110","id":308209355,"user":{"login":"dusan-rychnovsky","id":5459795,"avatar_url":"https://avatars2.githubusercontent.com/u/5459795?v=3","gravatar_id":"","url":"https://api.github.com/users/dusan-rychnovsky","html_url":"https://github.com/dusan-rychnovsky","followers_url":"https://api.github.com/users/dusan-rychnovsky/followers","following_url":"https://api.github.com/users/dusan-rychnovsky/following{/other_user}","gists_url":"https://api.github.com/users/dusan-rychnovsky/gists{/gist_id}","starred_url":"https://api.github.com/users/dusan-rychnovsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dusan-rychnovsky/subscriptions","organizations_url":"https://api.github.com/users/dusan-rychnovsky/orgs","repos_url":"https://api.github.com/users/dusan-rychnovsky/repos","events_url":"https://api.github.com/users/dusan-rychnovsky/events{/privacy}","received_events_url":"https://api.github.com/users/dusan-rychnovsky/received_events","type":"User","site_admin":false},"created_at":"2017-06-13T18:38:11Z","updated_at":"2017-06-13T18:38:11Z","body":"@yegor256\r\n\r\nIf you need to query the limit from a database then this needs to be done on the caller side and provided to `LimitedIterable` via constructor. From the `LimitIterable`'s perspective, it will always be \"just an int\". It is the callers responsibility to validate the limit.\r\n\r\nThis exception does not serve to validate user input, it is not even intended to be caught / handled. It is an assertion and it's only purpose is to catch errors in code. The reason why I'm using an explicit if stmt + exception is that Java lacks a reasonable `assert` construct.\r\n\r\nIf you decide to condemn assertions, in my opinion you're loosing a valuable quality-assurance tool.\r\n\r\nAnyway, I don't see how this check can be done other than in constructor, so I'm going to omit it completely."}}
{"actor":{"display_login":"dusan-rychnovsky"}}