{"action":"created","comment":{"url":"https://api.github.com/repos/iZettle/izettle-toolbox/pulls/comments/23915011","id":23915011,"diff_hunk":"@@ -43,6 +43,30 @@ public static boolean allNull(Object... objects) {\n         return true;\n     }\n \n+    public static boolean allFalse(boolean... tests) {","path":"izettle-java/src/main/java/com/izettle/java/ValueChecks.java","position":4,"original_position":4,"commit_id":"5c60df90d80ec501a00055c8abd9b72e7247af1c","original_commit_id":"5c60df90d80ec501a00055c8abd9b72e7247af1c","user":{"login":"mikaellothman","id":1298442,"avatar_url":"https://avatars.githubusercontent.com/u/1298442?v=3","gravatar_id":"","url":"https://api.github.com/users/mikaellothman","html_url":"https://github.com/mikaellothman","followers_url":"https://api.github.com/users/mikaellothman/followers","following_url":"https://api.github.com/users/mikaellothman/following{/other_user}","gists_url":"https://api.github.com/users/mikaellothman/gists{/gist_id}","starred_url":"https://api.github.com/users/mikaellothman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikaellothman/subscriptions","organizations_url":"https://api.github.com/users/mikaellothman/orgs","repos_url":"https://api.github.com/users/mikaellothman/repos","events_url":"https://api.github.com/users/mikaellothman/events{/privacy}","received_events_url":"https://api.github.com/users/mikaellothman/received_events","type":"User","site_admin":false},"body":"You could forces \"at least one argument\" by setting the parameter list to `allFalse(boolean value, boolean... values)` if you want to...","created_at":"2015-02-02T09:55:33Z","updated_at":"2015-02-02T09:55:33Z","html_url":"https://github.com/iZettle/izettle-toolbox/pull/104#discussion_r23915011","pull_request_url":"https://api.github.com/repos/iZettle/izettle-toolbox/pulls/104","_links":{"self":{"href":"https://api.github.com/repos/iZettle/izettle-toolbox/pulls/comments/23915011"},"html":{"href":"https://github.com/iZettle/izettle-toolbox/pull/104#discussion_r23915011"},"pull_request":{"href":"https://api.github.com/repos/iZettle/izettle-toolbox/pulls/104"}}},"pull_request":{"url":"https://api.github.com/repos/iZettle/izettle-toolbox/pulls/104","id":28455547,"html_url":"https://github.com/iZettle/izettle-toolbox/pull/104","diff_url":"https://github.com/iZettle/izettle-toolbox/pull/104.diff","patch_url":"https://github.com/iZettle/izettle-toolbox/pull/104.patch","issue_url":"https://api.github.com/repos/iZettle/izettle-toolbox/issues/104","number":104,"state":"open","locked":false,"title":"ValueChecks: new methods - allTrue and allFalse","user":{"login":"adamvoncorswant","id":1142587,"avatar_url":"https://avatars.githubusercontent.com/u/1142587?v=3","gravatar_id":"","url":"https://api.github.com/users/adamvoncorswant","html_url":"https://github.com/adamvoncorswant","followers_url":"https://api.github.com/users/adamvoncorswant/followers","following_url":"https://api.github.com/users/adamvoncorswant/following{/other_user}","gists_url":"https://api.github.com/users/adamvoncorswant/gists{/gist_id}","starred_url":"https://api.github.com/users/adamvoncorswant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamvoncorswant/subscriptions","organizations_url":"https://api.github.com/users/adamvoncorswant/orgs","repos_url":"https://api.github.com/users/adamvoncorswant/repos","events_url":"https://api.github.com/users/adamvoncorswant/events{/privacy}","received_events_url":"https://api.github.com/users/adamvoncorswant/received_events","type":"User","site_admin":false},"body":"To make some statements more readable, for example:\r\n```java\r\nboolean passesSanityChecks = true;\r\npassesSanityChecks &= clearedAccount.getCurrencyId() == liquidAccount.getCurrencyId();\r\npassesSanityChecks &= clearedAccount.getOrganizationId().equals(liquidAccount.getOrganizationId());\r\npassesSanityChecks &= clearedAccount.getAccountType() == AccountType.CLIENT_CLEARED_ACCOUNT;\r\npassesSanityChecks &= liquidAccount.getAccountType() == AccountType.CLIENT_LIQUID_ACCOUNT;\r\npassesSanityChecks &= originatingTxId != null;\r\nif (!passesSanityChecks) {\r\n    ....\r\n}\r\n\r\n```\r\ncan now be written instead as:\r\n```java\r\nfinal boolean passesSanityChecks = ValueChecks.allTrue(\r\n    clearedAccount.getCurrencyId() == liquidAccount.getCurrencyId(),\r\n    clearedAccount.getOrganizationId().equals(liquidAccount.getOrganizationId()),\r\n    clearedAccount.getAccountType() == AccountType.CLIENT_CLEARED_ACCOUNT,\r\n    liquidAccount.getAccountType() == AccountType.CLIENT_LIQUID_ACCOUNT,\r\n    originatingTxId != null\r\n);\r\nif (!passesSanityChecks) {\r\n    ....\r\n}\r\n```","created_at":"2015-02-02T09:51:02Z","updated_at":"2015-02-02T09:55:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"90f80ba3e10f52eb9d9dc017c3660c148b886133","assignee":{"login":"mikaellothman","id":1298442,"avatar_url":"https://avatars.githubusercontent.com/u/1298442?v=3","gravatar_id":"","url":"https://api.github.com/users/mikaellothman","html_url":"https://github.com/mikaellothman","followers_url":"https://api.github.com/users/mikaellothman/followers","following_url":"https://api.github.com/users/mikaellothman/following{/other_user}","gists_url":"https://api.github.com/users/mikaellothman/gists{/gist_id}","starred_url":"https://api.github.com/users/mikaellothman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikaellothman/subscriptions","organizations_url":"https://api.github.com/users/mikaellothman/orgs","repos_url":"https://api.github.com/users/mikaellothman/repos","events_url":"https://api.github.com/users/mikaellothman/events{/privacy}","received_events_url":"https://api.github.com/users/mikaellothman/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/iZettle/izettle-toolbox/pulls/104/commits","review_comments_url":"https://api.github.com/repos/iZettle/izettle-toolbox/pulls/104/comments","review_comment_url":"https://api.github.com/repos/iZettle/izettle-toolbox/pulls/comments/{number}","comments_url":"https://api.github.com/repos/iZettle/izettle-toolbox/issues/104/comments","statuses_url":"https://api.github.com/repos/iZettle/izettle-toolbox/statuses/5c60df90d80ec501a00055c8abd9b72e7247af1c","head":{"label":"iZettle:valuechecks-alltrue-allfalse","ref":"valuechecks-alltrue-allfalse","sha":"5c60df90d80ec501a00055c8abd9b72e7247af1c","user":{"login":"iZettle","id":1272526,"avatar_url":"https://avatars.githubusercontent.com/u/1272526?v=3","gravatar_id":"","url":"https://api.github.com/users/iZettle","html_url":"https://github.com/iZettle","followers_url":"https://api.github.com/users/iZettle/followers","following_url":"https://api.github.com/users/iZettle/following{/other_user}","gists_url":"https://api.github.com/users/iZettle/gists{/gist_id}","starred_url":"https://api.github.com/users/iZettle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iZettle/subscriptions","organizations_url":"https://api.github.com/users/iZettle/orgs","repos_url":"https://api.github.com/users/iZettle/repos","events_url":"https://api.github.com/users/iZettle/events{/privacy}","received_events_url":"https://api.github.com/users/iZettle/received_events","type":"Organization","site_admin":false},"repo":{"id":13087671,"name":"izettle-toolbox","full_name":"iZettle/izettle-toolbox","owner":{"login":"iZettle","id":1272526,"avatar_url":"https://avatars.githubusercontent.com/u/1272526?v=3","gravatar_id":"","url":"https://api.github.com/users/iZettle","html_url":"https://github.com/iZettle","followers_url":"https://api.github.com/users/iZettle/followers","following_url":"https://api.github.com/users/iZettle/following{/other_user}","gists_url":"https://api.github.com/users/iZettle/gists{/gist_id}","starred_url":"https://api.github.com/users/iZettle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iZettle/subscriptions","organizations_url":"https://api.github.com/users/iZettle/orgs","repos_url":"https://api.github.com/users/iZettle/repos","events_url":"https://api.github.com/users/iZettle/events{/privacy}","received_events_url":"https://api.github.com/users/iZettle/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/iZettle/izettle-toolbox","description":"","fork":false,"url":"https://api.github.com/repos/iZettle/izettle-toolbox","forks_url":"https://api.github.com/repos/iZettle/izettle-toolbox/forks","keys_url":"https://api.github.com/repos/iZettle/izettle-toolbox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iZettle/izettle-toolbox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iZettle/izettle-toolbox/teams","hooks_url":"https://api.github.com/repos/iZettle/izettle-toolbox/hooks","issue_events_url":"https://api.github.com/repos/iZettle/izettle-toolbox/issues/events{/number}","events_url":"https://api.github.com/repos/iZettle/izettle-toolbox/events","assignees_url":"https://api.github.com/repos/iZettle/izettle-toolbox/assignees{/user}","branches_url":"https://api.github.com/repos/iZettle/izettle-toolbox/branches{/branch}","tags_url":"https://api.github.com/repos/iZettle/izettle-toolbox/tags","blobs_url":"https://api.github.com/repos/iZettle/izettle-toolbox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iZettle/izettle-toolbox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iZettle/izettle-toolbox/git/refs{/sha}","trees_url":"https://api.github.com/repos/iZettle/izettle-toolbox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iZettle/izettle-toolbox/statuses/{sha}","languages_url":"https://api.github.com/repos/iZettle/izettle-toolbox/languages","stargazers_url":"https://api.github.com/repos/iZettle/izettle-toolbox/stargazers","contributors_url":"https://api.github.com/repos/iZettle/izettle-toolbox/contributors","subscribers_url":"https://api.github.com/repos/iZettle/izettle-toolbox/subscribers","subscription_url":"https://api.github.com/repos/iZettle/izettle-toolbox/subscription","commits_url":"https://api.github.com/repos/iZettle/izettle-toolbox/commits{/sha}","git_commits_url":"https://api.github.com/repos/iZettle/izettle-toolbox/git/commits{/sha}","comments_url":"https://api.github.com/repos/iZettle/izettle-toolbox/comments{/number}","issue_comment_url":"https://api.github.com/repos/iZettle/izettle-toolbox/issues/comments/{number}","contents_url":"https://api.github.com/repos/iZettle/izettle-toolbox/contents/{+path}","compare_url":"https://api.github.com/repos/iZettle/izettle-toolbox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iZettle/izettle-toolbox/merges","archive_url":"https://api.github.com/repos/iZettle/izettle-toolbox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iZettle/izettle-toolbox/downloads","issues_url":"https://api.github.com/repos/iZettle/izettle-toolbox/issues{/number}","pulls_url":"https://api.github.com/repos/iZettle/izettle-toolbox/pulls{/number}","milestones_url":"https://api.github.com/repos/iZettle/izettle-toolbox/milestones{/number}","notifications_url":"https://api.github.com/repos/iZettle/izettle-toolbox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iZettle/izettle-toolbox/labels{/name}","releases_url":"https://api.github.com/repos/iZettle/izettle-toolbox/releases{/id}","created_at":"2013-09-25T08:01:29Z","updated_at":"2015-01-29T15:58:53Z","pushed_at":"2015-02-02T09:50:09Z","git_url":"git://github.com/iZettle/izettle-toolbox.git","ssh_url":"git@github.com:iZettle/izettle-toolbox.git","clone_url":"https://github.com/iZettle/izettle-toolbox.git","svn_url":"https://github.com/iZettle/izettle-toolbox","homepage":null,"size":5460,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":3,"default_branch":"master"}},"base":{"label":"iZettle:master","ref":"master","sha":"5b42bdcae9fd59e6abc92f9ba431fd285571e529","user":{"login":"iZettle","id":1272526,"avatar_url":"https://avatars.githubusercontent.com/u/1272526?v=3","gravatar_id":"","url":"https://api.github.com/users/iZettle","html_url":"https://github.com/iZettle","followers_url":"https://api.github.com/users/iZettle/followers","following_url":"https://api.github.com/users/iZettle/following{/other_user}","gists_url":"https://api.github.com/users/iZettle/gists{/gist_id}","starred_url":"https://api.github.com/users/iZettle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iZettle/subscriptions","organizations_url":"https://api.github.com/users/iZettle/orgs","repos_url":"https://api.github.com/users/iZettle/repos","events_url":"https://api.github.com/users/iZettle/events{/privacy}","received_events_url":"https://api.github.com/users/iZettle/received_events","type":"Organization","site_admin":false},"repo":{"id":13087671,"name":"izettle-toolbox","full_name":"iZettle/izettle-toolbox","owner":{"login":"iZettle","id":1272526,"avatar_url":"https://avatars.githubusercontent.com/u/1272526?v=3","gravatar_id":"","url":"https://api.github.com/users/iZettle","html_url":"https://github.com/iZettle","followers_url":"https://api.github.com/users/iZettle/followers","following_url":"https://api.github.com/users/iZettle/following{/other_user}","gists_url":"https://api.github.com/users/iZettle/gists{/gist_id}","starred_url":"https://api.github.com/users/iZettle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iZettle/subscriptions","organizations_url":"https://api.github.com/users/iZettle/orgs","repos_url":"https://api.github.com/users/iZettle/repos","events_url":"https://api.github.com/users/iZettle/events{/privacy}","received_events_url":"https://api.github.com/users/iZettle/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/iZettle/izettle-toolbox","description":"","fork":false,"url":"https://api.github.com/repos/iZettle/izettle-toolbox","forks_url":"https://api.github.com/repos/iZettle/izettle-toolbox/forks","keys_url":"https://api.github.com/repos/iZettle/izettle-toolbox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iZettle/izettle-toolbox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iZettle/izettle-toolbox/teams","hooks_url":"https://api.github.com/repos/iZettle/izettle-toolbox/hooks","issue_events_url":"https://api.github.com/repos/iZettle/izettle-toolbox/issues/events{/number}","events_url":"https://api.github.com/repos/iZettle/izettle-toolbox/events","assignees_url":"https://api.github.com/repos/iZettle/izettle-toolbox/assignees{/user}","branches_url":"https://api.github.com/repos/iZettle/izettle-toolbox/branches{/branch}","tags_url":"https://api.github.com/repos/iZettle/izettle-toolbox/tags","blobs_url":"https://api.github.com/repos/iZettle/izettle-toolbox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iZettle/izettle-toolbox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iZettle/izettle-toolbox/git/refs{/sha}","trees_url":"https://api.github.com/repos/iZettle/izettle-toolbox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iZettle/izettle-toolbox/statuses/{sha}","languages_url":"https://api.github.com/repos/iZettle/izettle-toolbox/languages","stargazers_url":"https://api.github.com/repos/iZettle/izettle-toolbox/stargazers","contributors_url":"https://api.github.com/repos/iZettle/izettle-toolbox/contributors","subscribers_url":"https://api.github.com/repos/iZettle/izettle-toolbox/subscribers","subscription_url":"https://api.github.com/repos/iZettle/izettle-toolbox/subscription","commits_url":"https://api.github.com/repos/iZettle/izettle-toolbox/commits{/sha}","git_commits_url":"https://api.github.com/repos/iZettle/izettle-toolbox/git/commits{/sha}","comments_url":"https://api.github.com/repos/iZettle/izettle-toolbox/comments{/number}","issue_comment_url":"https://api.github.com/repos/iZettle/izettle-toolbox/issues/comments/{number}","contents_url":"https://api.github.com/repos/iZettle/izettle-toolbox/contents/{+path}","compare_url":"https://api.github.com/repos/iZettle/izettle-toolbox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iZettle/izettle-toolbox/merges","archive_url":"https://api.github.com/repos/iZettle/izettle-toolbox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iZettle/izettle-toolbox/downloads","issues_url":"https://api.github.com/repos/iZettle/izettle-toolbox/issues{/number}","pulls_url":"https://api.github.com/repos/iZettle/izettle-toolbox/pulls{/number}","milestones_url":"https://api.github.com/repos/iZettle/izettle-toolbox/milestones{/number}","notifications_url":"https://api.github.com/repos/iZettle/izettle-toolbox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iZettle/izettle-toolbox/labels{/name}","releases_url":"https://api.github.com/repos/iZettle/izettle-toolbox/releases{/id}","created_at":"2013-09-25T08:01:29Z","updated_at":"2015-01-29T15:58:53Z","pushed_at":"2015-02-02T09:50:09Z","git_url":"git://github.com/iZettle/izettle-toolbox.git","ssh_url":"git@github.com:iZettle/izettle-toolbox.git","clone_url":"https://github.com/iZettle/izettle-toolbox.git","svn_url":"https://github.com/iZettle/izettle-toolbox","homepage":null,"size":5460,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/iZettle/izettle-toolbox/pulls/104"},"html":{"href":"https://github.com/iZettle/izettle-toolbox/pull/104"},"issue":{"href":"https://api.github.com/repos/iZettle/izettle-toolbox/issues/104"},"comments":{"href":"https://api.github.com/repos/iZettle/izettle-toolbox/issues/104/comments"},"review_comments":{"href":"https://api.github.com/repos/iZettle/izettle-toolbox/pulls/104/comments"},"review_comment":{"href":"https://api.github.com/repos/iZettle/izettle-toolbox/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/iZettle/izettle-toolbox/pulls/104/commits"},"statuses":{"href":"https://api.github.com/repos/iZettle/izettle-toolbox/statuses/5c60df90d80ec501a00055c8abd9b72e7247af1c"}}}}