{"action":"created","issue":{"url":"https://api.github.com/repos/square/flow/issues/188","repository_url":"https://api.github.com/repos/square/flow","labels_url":"https://api.github.com/repos/square/flow/issues/188/labels{/name}","comments_url":"https://api.github.com/repos/square/flow/issues/188/comments","events_url":"https://api.github.com/repos/square/flow/issues/188/events","html_url":"https://github.com/square/flow/issues/188","id":150520780,"number":188,"title":"TreeKey and MultiKey shouldn't be mutually-exclusive.","user":{"login":"fengdai","id":3105406,"avatar_url":"https://avatars.githubusercontent.com/u/3105406?v=3","gravatar_id":"","url":"https://api.github.com/users/fengdai","html_url":"https://github.com/fengdai","followers_url":"https://api.github.com/users/fengdai/followers","following_url":"https://api.github.com/users/fengdai/following{/other_user}","gists_url":"https://api.github.com/users/fengdai/gists{/gist_id}","starred_url":"https://api.github.com/users/fengdai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fengdai/subscriptions","organizations_url":"https://api.github.com/users/fengdai/orgs","repos_url":"https://api.github.com/users/fengdai/repos","events_url":"https://api.github.com/users/fengdai/events{/privacy}","received_events_url":"https://api.github.com/users/fengdai/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-04-23T05:45:09Z","updated_at":"2016-04-26T15:30:49Z","closed_at":null,"body":"A key should be able to implement both TreeKey and MultiKey. Because the two interfaces are not logically mutually-exclusive.\r\n\r\nFor an instance. A NormalScreen and A DialogScreen, they both have parent key CommonPath. The implementation should be like this:\r\n\r\n```java\r\npublic class NormalScreen implements TreeKey {\r\n    public NormalScreen() {\r\n    }\r\n\r\n   @Override public Object getParentKey() {\r\n    return new CommonPath();\r\n   }\r\n}\r\n```\r\n\r\n```java\r\npublic class DialogScreen implements MultiKey, TreeKey {\r\n    final Object mainContent;\r\n    public DialogScreen(NormalScreen mainContent) {\r\n        this.mainContent = mainContent;\r\n    }\r\n\r\n   @Override public List<Object> getKeys() {\r\n       return Collections.singletonList(mainContent);\r\n   }\r\n\r\n   @Override public Object getParentKey() {\r\n    return new CommonPath();\r\n   }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/square/flow/issues/comments/214784027","html_url":"https://github.com/square/flow/issues/188#issuecomment-214784027","issue_url":"https://api.github.com/repos/square/flow/issues/188","id":214784027,"user":{"login":"fengdai","id":3105406,"avatar_url":"https://avatars.githubusercontent.com/u/3105406?v=3","gravatar_id":"","url":"https://api.github.com/users/fengdai","html_url":"https://github.com/fengdai","followers_url":"https://api.github.com/users/fengdai/followers","following_url":"https://api.github.com/users/fengdai/following{/other_user}","gists_url":"https://api.github.com/users/fengdai/gists{/gist_id}","starred_url":"https://api.github.com/users/fengdai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fengdai/subscriptions","organizations_url":"https://api.github.com/users/fengdai/orgs","repos_url":"https://api.github.com/users/fengdai/repos","events_url":"https://api.github.com/users/fengdai/events{/privacy}","received_events_url":"https://api.github.com/users/fengdai/received_events","type":"User","site_admin":false},"created_at":"2016-04-26T15:30:49Z","updated_at":"2016-04-26T15:30:49Z","body":"@loganj Any official explanation?"}}