{"action":"created","comment":{"url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/pulls/comments/40704869","id":40704869,"diff_hunk":"@@ -12,44 +13,47 @@\n public class SocketHint<T> {\n     public enum View {NONE, SPINNER, SLIDER, RANGE, SELECT}\n \n-    private String identifier;\n-    private Class<T> type;\n-    private View view;\n-    private T[] domain;\n+    private final String identifier;\n+    private final Class<T> type;\n+    private final Supplier<T> initialValueSupplier;","path":"src/main/java/edu/wpi/grip/core/SocketHint.java","position":18,"original_position":18,"commit_id":"03813279e7d48666f4df67e7ba2a7a807a3473aa","original_commit_id":"03813279e7d48666f4df67e7ba2a7a807a3473aa","user":{"login":"JLLeitschuh","id":1323708,"avatar_url":"https://avatars.githubusercontent.com/u/1323708?v=3","gravatar_id":"","url":"https://api.github.com/users/JLLeitschuh","html_url":"https://github.com/JLLeitschuh","followers_url":"https://api.github.com/users/JLLeitschuh/followers","following_url":"https://api.github.com/users/JLLeitschuh/following{/other_user}","gists_url":"https://api.github.com/users/JLLeitschuh/gists{/gist_id}","starred_url":"https://api.github.com/users/JLLeitschuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JLLeitschuh/subscriptions","organizations_url":"https://api.github.com/users/JLLeitschuh/orgs","repos_url":"https://api.github.com/users/JLLeitschuh/repos","events_url":"https://api.github.com/users/JLLeitschuh/events{/privacy}","received_events_url":"https://api.github.com/users/JLLeitschuh/received_events","type":"User","site_admin":false},"body":"Should be optional","created_at":"2015-09-29T17:54:52Z","updated_at":"2015-09-29T17:54:52Z","html_url":"https://github.com/WPIRoboticsProjects/GRIP/pull/27#discussion_r40704869","pull_request_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/pulls/comments/40704869"},"html":{"href":"https://github.com/WPIRoboticsProjects/GRIP/pull/27#discussion_r40704869"},"pull_request":{"href":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/pulls/27","id":46300104,"html_url":"https://github.com/WPIRoboticsProjects/GRIP/pull/27","diff_url":"https://github.com/WPIRoboticsProjects/GRIP/pull/27.diff","patch_url":"https://github.com/WPIRoboticsProjects/GRIP/pull/27.patch","issue_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/issues/27","number":27,"state":"open","locked":false,"title":"Add SocketHint default values with Suppliers","user":{"login":"ThomasJClark","id":3964980,"avatar_url":"https://avatars.githubusercontent.com/u/3964980?v=3","gravatar_id":"","url":"https://api.github.com/users/ThomasJClark","html_url":"https://github.com/ThomasJClark","followers_url":"https://api.github.com/users/ThomasJClark/followers","following_url":"https://api.github.com/users/ThomasJClark/following{/other_user}","gists_url":"https://api.github.com/users/ThomasJClark/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasJClark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasJClark/subscriptions","organizations_url":"https://api.github.com/users/ThomasJClark/orgs","repos_url":"https://api.github.com/users/ThomasJClark/repos","events_url":"https://api.github.com/users/ThomasJClark/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasJClark/received_events","type":"User","site_admin":false},"body":"Instead of specifying a default value for sockets where no other value\r\nis set, you can specify a function that returns an initial value for any\r\nsocket that isn't initialized with a value.  This ensures that all\r\nsockets have a value, and also that those values can each be a new\r\ninstance (for mutable types like Mat).\r\n\r\nFor example, to make every socket have 5 as an initial value:\r\n\r\n    sh = new SocketHint<>(\"my-socket\", Integer.class, 5);\r\n\r\nBut to make every socket construct a new Mat as an initial value (so\r\nthey don't all share the same instance):\r\n\r\n    sh = new SocketHint<>(\"my-socket\", Mat.class, Mat::new);\r\n\r\nWhen constructing the sockets themselves, it's not necessary to specify a\r\ndefault value, but that constructor is still there in case you want to\r\nimmediately set a value other than the initial one from the socket hint.","created_at":"2015-09-29T16:25:58Z","updated_at":"2015-09-29T17:54:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e1f8f627fb3dde2aacc437b2d4193811c599e7a9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/pulls/27/commits","review_comments_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/pulls/27/comments","review_comment_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/issues/27/comments","statuses_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/statuses/03813279e7d48666f4df67e7ba2a7a807a3473aa","head":{"label":"ThomasJClark:default-value-refactor","ref":"default-value-refactor","sha":"03813279e7d48666f4df67e7ba2a7a807a3473aa","user":{"login":"ThomasJClark","id":3964980,"avatar_url":"https://avatars.githubusercontent.com/u/3964980?v=3","gravatar_id":"","url":"https://api.github.com/users/ThomasJClark","html_url":"https://github.com/ThomasJClark","followers_url":"https://api.github.com/users/ThomasJClark/followers","following_url":"https://api.github.com/users/ThomasJClark/following{/other_user}","gists_url":"https://api.github.com/users/ThomasJClark/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasJClark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasJClark/subscriptions","organizations_url":"https://api.github.com/users/ThomasJClark/orgs","repos_url":"https://api.github.com/users/ThomasJClark/repos","events_url":"https://api.github.com/users/ThomasJClark/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasJClark/received_events","type":"User","site_admin":false},"repo":{"id":41703859,"name":"GRIP","full_name":"ThomasJClark/GRIP","owner":{"login":"ThomasJClark","id":3964980,"avatar_url":"https://avatars.githubusercontent.com/u/3964980?v=3","gravatar_id":"","url":"https://api.github.com/users/ThomasJClark","html_url":"https://github.com/ThomasJClark","followers_url":"https://api.github.com/users/ThomasJClark/followers","following_url":"https://api.github.com/users/ThomasJClark/following{/other_user}","gists_url":"https://api.github.com/users/ThomasJClark/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasJClark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasJClark/subscriptions","organizations_url":"https://api.github.com/users/ThomasJClark/orgs","repos_url":"https://api.github.com/users/ThomasJClark/repos","events_url":"https://api.github.com/users/ThomasJClark/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasJClark/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ThomasJClark/GRIP","description":"Program for rapidly developing computer vision applications","fork":true,"url":"https://api.github.com/repos/ThomasJClark/GRIP","forks_url":"https://api.github.com/repos/ThomasJClark/GRIP/forks","keys_url":"https://api.github.com/repos/ThomasJClark/GRIP/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ThomasJClark/GRIP/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ThomasJClark/GRIP/teams","hooks_url":"https://api.github.com/repos/ThomasJClark/GRIP/hooks","issue_events_url":"https://api.github.com/repos/ThomasJClark/GRIP/issues/events{/number}","events_url":"https://api.github.com/repos/ThomasJClark/GRIP/events","assignees_url":"https://api.github.com/repos/ThomasJClark/GRIP/assignees{/user}","branches_url":"https://api.github.com/repos/ThomasJClark/GRIP/branches{/branch}","tags_url":"https://api.github.com/repos/ThomasJClark/GRIP/tags","blobs_url":"https://api.github.com/repos/ThomasJClark/GRIP/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ThomasJClark/GRIP/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ThomasJClark/GRIP/git/refs{/sha}","trees_url":"https://api.github.com/repos/ThomasJClark/GRIP/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ThomasJClark/GRIP/statuses/{sha}","languages_url":"https://api.github.com/repos/ThomasJClark/GRIP/languages","stargazers_url":"https://api.github.com/repos/ThomasJClark/GRIP/stargazers","contributors_url":"https://api.github.com/repos/ThomasJClark/GRIP/contributors","subscribers_url":"https://api.github.com/repos/ThomasJClark/GRIP/subscribers","subscription_url":"https://api.github.com/repos/ThomasJClark/GRIP/subscription","commits_url":"https://api.github.com/repos/ThomasJClark/GRIP/commits{/sha}","git_commits_url":"https://api.github.com/repos/ThomasJClark/GRIP/git/commits{/sha}","comments_url":"https://api.github.com/repos/ThomasJClark/GRIP/comments{/number}","issue_comment_url":"https://api.github.com/repos/ThomasJClark/GRIP/issues/comments{/number}","contents_url":"https://api.github.com/repos/ThomasJClark/GRIP/contents/{+path}","compare_url":"https://api.github.com/repos/ThomasJClark/GRIP/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ThomasJClark/GRIP/merges","archive_url":"https://api.github.com/repos/ThomasJClark/GRIP/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ThomasJClark/GRIP/downloads","issues_url":"https://api.github.com/repos/ThomasJClark/GRIP/issues{/number}","pulls_url":"https://api.github.com/repos/ThomasJClark/GRIP/pulls{/number}","milestones_url":"https://api.github.com/repos/ThomasJClark/GRIP/milestones{/number}","notifications_url":"https://api.github.com/repos/ThomasJClark/GRIP/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ThomasJClark/GRIP/labels{/name}","releases_url":"https://api.github.com/repos/ThomasJClark/GRIP/releases{/id}","created_at":"2015-08-31T22:30:05Z","updated_at":"2015-08-31T22:30:05Z","pushed_at":"2015-09-29T16:27:26Z","git_url":"git://github.com/ThomasJClark/GRIP.git","ssh_url":"git@github.com:ThomasJClark/GRIP.git","clone_url":"https://github.com/ThomasJClark/GRIP.git","svn_url":"https://github.com/ThomasJClark/GRIP","homepage":"http://wpiroboticsprojects.github.io/GRIP","size":2224,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"WPIRoboticsProjects:master","ref":"master","sha":"b304d0ae1cec326c785fd04e8eb126a3c6cedab2","user":{"login":"WPIRoboticsProjects","id":14004340,"avatar_url":"https://avatars.githubusercontent.com/u/14004340?v=3","gravatar_id":"","url":"https://api.github.com/users/WPIRoboticsProjects","html_url":"https://github.com/WPIRoboticsProjects","followers_url":"https://api.github.com/users/WPIRoboticsProjects/followers","following_url":"https://api.github.com/users/WPIRoboticsProjects/following{/other_user}","gists_url":"https://api.github.com/users/WPIRoboticsProjects/gists{/gist_id}","starred_url":"https://api.github.com/users/WPIRoboticsProjects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WPIRoboticsProjects/subscriptions","organizations_url":"https://api.github.com/users/WPIRoboticsProjects/orgs","repos_url":"https://api.github.com/users/WPIRoboticsProjects/repos","events_url":"https://api.github.com/users/WPIRoboticsProjects/events{/privacy}","received_events_url":"https://api.github.com/users/WPIRoboticsProjects/received_events","type":"Organization","site_admin":false},"repo":{"id":41505521,"name":"GRIP","full_name":"WPIRoboticsProjects/GRIP","owner":{"login":"WPIRoboticsProjects","id":14004340,"avatar_url":"https://avatars.githubusercontent.com/u/14004340?v=3","gravatar_id":"","url":"https://api.github.com/users/WPIRoboticsProjects","html_url":"https://github.com/WPIRoboticsProjects","followers_url":"https://api.github.com/users/WPIRoboticsProjects/followers","following_url":"https://api.github.com/users/WPIRoboticsProjects/following{/other_user}","gists_url":"https://api.github.com/users/WPIRoboticsProjects/gists{/gist_id}","starred_url":"https://api.github.com/users/WPIRoboticsProjects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WPIRoboticsProjects/subscriptions","organizations_url":"https://api.github.com/users/WPIRoboticsProjects/orgs","repos_url":"https://api.github.com/users/WPIRoboticsProjects/repos","events_url":"https://api.github.com/users/WPIRoboticsProjects/events{/privacy}","received_events_url":"https://api.github.com/users/WPIRoboticsProjects/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WPIRoboticsProjects/GRIP","description":"Program for rapidly developing computer vision applications","fork":false,"url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP","forks_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/forks","keys_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/teams","hooks_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/hooks","issue_events_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/issues/events{/number}","events_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/events","assignees_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/assignees{/user}","branches_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/branches{/branch}","tags_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/tags","blobs_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/git/refs{/sha}","trees_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/statuses/{sha}","languages_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/languages","stargazers_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/stargazers","contributors_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/contributors","subscribers_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/subscribers","subscription_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/subscription","commits_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/commits{/sha}","git_commits_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/git/commits{/sha}","comments_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/comments{/number}","issue_comment_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/issues/comments{/number}","contents_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/contents/{+path}","compare_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/merges","archive_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/downloads","issues_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/issues{/number}","pulls_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/pulls{/number}","milestones_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/milestones{/number}","notifications_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/labels{/name}","releases_url":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/releases{/id}","created_at":"2015-08-27T18:59:07Z","updated_at":"2015-09-20T17:15:16Z","pushed_at":"2015-09-29T16:27:28Z","git_url":"git://github.com/WPIRoboticsProjects/GRIP.git","ssh_url":"git@github.com:WPIRoboticsProjects/GRIP.git","clone_url":"https://github.com/WPIRoboticsProjects/GRIP.git","svn_url":"https://github.com/WPIRoboticsProjects/GRIP","homepage":"http://wpi.edu","size":2704,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/pulls/27"},"html":{"href":"https://github.com/WPIRoboticsProjects/GRIP/pull/27"},"issue":{"href":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/issues/27"},"comments":{"href":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/WPIRoboticsProjects/GRIP/statuses/03813279e7d48666f4df67e7ba2a7a807a3473aa"}}}}