{"action":"created","issue":{"url":"https://api.github.com/repos/cinchapi/concourse/issues/124","repository_url":"https://api.github.com/repos/cinchapi/concourse","labels_url":"https://api.github.com/repos/cinchapi/concourse/issues/124/labels{/name}","comments_url":"https://api.github.com/repos/cinchapi/concourse/issues/124/comments","events_url":"https://api.github.com/repos/cinchapi/concourse/issues/124/events","html_url":"https://github.com/cinchapi/concourse/issues/124","id":123573860,"number":124,"title":"Should transform value sets lazily","user":{"login":"jtnelson","id":1495450,"avatar_url":"https://avatars.githubusercontent.com/u/1495450?v=3","gravatar_id":"","url":"https://api.github.com/users/jtnelson","html_url":"https://github.com/jtnelson","followers_url":"https://api.github.com/users/jtnelson/followers","following_url":"https://api.github.com/users/jtnelson/following{/other_user}","gists_url":"https://api.github.com/users/jtnelson/gists{/gist_id}","starred_url":"https://api.github.com/users/jtnelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtnelson/subscriptions","organizations_url":"https://api.github.com/users/jtnelson/orgs","repos_url":"https://api.github.com/users/jtnelson/repos","events_url":"https://api.github.com/users/jtnelson/events{/privacy}","received_events_url":"https://api.github.com/users/jtnelson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"chandresh-pancholi","id":3134439,"avatar_url":"https://avatars.githubusercontent.com/u/3134439?v=3","gravatar_id":"","url":"https://api.github.com/users/chandresh-pancholi","html_url":"https://github.com/chandresh-pancholi","followers_url":"https://api.github.com/users/chandresh-pancholi/followers","following_url":"https://api.github.com/users/chandresh-pancholi/following{/other_user}","gists_url":"https://api.github.com/users/chandresh-pancholi/gists{/gist_id}","starred_url":"https://api.github.com/users/chandresh-pancholi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chandresh-pancholi/subscriptions","organizations_url":"https://api.github.com/users/chandresh-pancholi/orgs","repos_url":"https://api.github.com/users/chandresh-pancholi/repos","events_url":"https://api.github.com/users/chandresh-pancholi/events{/privacy}","received_events_url":"https://api.github.com/users/chandresh-pancholi/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/cinchapi/concourse/milestones/4","html_url":"https://github.com/cinchapi/concourse/milestones/sprint_2016_1","labels_url":"https://api.github.com/repos/cinchapi/concourse/milestones/4/labels","id":1485413,"number":4,"title":"sprint_2016_1","description":"2016 Sprint #1","creator":{"login":"jtnelson","id":1495450,"avatar_url":"https://avatars.githubusercontent.com/u/1495450?v=3","gravatar_id":"","url":"https://api.github.com/users/jtnelson","html_url":"https://github.com/jtnelson","followers_url":"https://api.github.com/users/jtnelson/followers","following_url":"https://api.github.com/users/jtnelson/following{/other_user}","gists_url":"https://api.github.com/users/jtnelson/gists{/gist_id}","starred_url":"https://api.github.com/users/jtnelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtnelson/subscriptions","organizations_url":"https://api.github.com/users/jtnelson/orgs","repos_url":"https://api.github.com/users/jtnelson/repos","events_url":"https://api.github.com/users/jtnelson/events{/privacy}","received_events_url":"https://api.github.com/users/jtnelson/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":10,"state":"open","created_at":"2016-01-05T17:43:37Z","updated_at":"2016-04-01T10:24:37Z","due_on":"2016-01-31T05:00:00Z","closed_at":null},"comments":4,"created_at":"2015-12-22T23:09:32Z","updated_at":"2016-05-28T06:06:08Z","closed_at":null,"body":"Instead of \r\n```java\r\n                 Map<Long, Set<T>> pretty = PrettyLinkedHashMap\r\n                            .newPrettyLinkedHashMap(\"Record\", key);\r\n                    for (Entry<Long, Set<TObject>> entry : raw.entrySet()) {\r\n                        pretty.put(entry.getKey(), Transformers.transformSet(\r\n                                entry.getValue(),\r\n                                Conversions.<T> thriftToJavaCasted()));\r\n                    }\r\n```\r\nshould be doing something like\r\n```java\r\nMap<Long, Set<T>> transformed = Maps.transformValues(raw,\r\n                            TransformFunctions.set(Conversions\r\n                                    .<T> thriftToJavaCasted()));\r\n```\r\nassuming TransformFunctions.set looks like\r\n```java\r\npublic static <V1, V2> Function<Set<V1>, Set<V2>> set(\r\n            final Function<V1, V2> function) {\r\n        return new Function<Set<V1>, Set<V2>>() {\r\n\r\n            @Override\r\n            public Set<V2> apply(Set<V1> input) {\r\n                return Transformers.transformSet(input, function);\r\n            }\r\n\r\n        };\r\n    }\r\n```\r\n\r\nOnly challenge here is how do we `transformed` to be pretty lazily?"},"comment":{"url":"https://api.github.com/repos/cinchapi/concourse/issues/comments/222292338","html_url":"https://github.com/cinchapi/concourse/issues/124#issuecomment-222292338","issue_url":"https://api.github.com/repos/cinchapi/concourse/issues/124","id":222292338,"user":{"login":"chandresh-pancholi","id":3134439,"avatar_url":"https://avatars.githubusercontent.com/u/3134439?v=3","gravatar_id":"","url":"https://api.github.com/users/chandresh-pancholi","html_url":"https://github.com/chandresh-pancholi","followers_url":"https://api.github.com/users/chandresh-pancholi/followers","following_url":"https://api.github.com/users/chandresh-pancholi/following{/other_user}","gists_url":"https://api.github.com/users/chandresh-pancholi/gists{/gist_id}","starred_url":"https://api.github.com/users/chandresh-pancholi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chandresh-pancholi/subscriptions","organizations_url":"https://api.github.com/users/chandresh-pancholi/orgs","repos_url":"https://api.github.com/users/chandresh-pancholi/repos","events_url":"https://api.github.com/users/chandresh-pancholi/events{/privacy}","received_events_url":"https://api.github.com/users/chandresh-pancholi/received_events","type":"User","site_admin":false},"created_at":"2016-05-28T06:06:08Z","updated_at":"2016-05-28T06:06:08Z","body":"Below code is also transforming one set to another set using function. \r\n```\r\npublic static <F, V> Set<V> transformSet(Set<F> original,\r\n            Function<? super F, ? extends V> function) {\r\n        Set<V> transformed = Sets.newLinkedHashSetWithExpectedSize(original\r\n                .size());\r\n        for (F item : original) {\r\n            transformed.add(function.apply(item));\r\n        }\r\n        return transformed;\r\n    }\r\n```"}}
{"actor":{"display_login":"chandresh-pancholi"}}