{"action":"created","issue":{"url":"https://api.github.com/repos/sockeqwe/AdapterDelegates/issues/4","labels_url":"https://api.github.com/repos/sockeqwe/AdapterDelegates/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/sockeqwe/AdapterDelegates/issues/4/comments","events_url":"https://api.github.com/repos/sockeqwe/AdapterDelegates/issues/4/events","html_url":"https://github.com/sockeqwe/AdapterDelegates/issues/4","id":100869612,"number":4,"title":"Adapter Methods","user":{"login":"pixelbendr","id":12001207,"avatar_url":"https://avatars.githubusercontent.com/u/12001207?v=3","gravatar_id":"","url":"https://api.github.com/users/pixelbendr","html_url":"https://github.com/pixelbendr","followers_url":"https://api.github.com/users/pixelbendr/followers","following_url":"https://api.github.com/users/pixelbendr/following{/other_user}","gists_url":"https://api.github.com/users/pixelbendr/gists{/gist_id}","starred_url":"https://api.github.com/users/pixelbendr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pixelbendr/subscriptions","organizations_url":"https://api.github.com/users/pixelbendr/orgs","repos_url":"https://api.github.com/users/pixelbendr/repos","events_url":"https://api.github.com/users/pixelbendr/events{/privacy}","received_events_url":"https://api.github.com/users/pixelbendr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-13T21:06:39Z","updated_at":"2015-08-13T21:18:15Z","closed_at":null,"body":"Hello,\r\n\r\nI have some adapter methods in which I almost repeat for all adapters. Where should it be so I don't have to repeat but also can enable or disable which feature I want in individual adapters.\r\n\r\nOr I should just create an interface, extend the recycler view method. And use super and override to disable and enable functionality?\r\n\r\n\r\n\r\n   public void add(Object item) {\r\n        list.add(item);\r\n    }\r\n\r\n    public void addItem(Object item) {\r\n        add(item);\r\n        notifyDataSetChanged();\r\n    }\r\n\r\n    public void removeItem(int position) {\r\n        list.remove(position);\r\n        notifyItemRemoved(position);\r\n    }\r\n\r\n    public void clearItems() {\r\n        list.clear();\r\n    } "},"comment":{"url":"https://api.github.com/repos/sockeqwe/AdapterDelegates/issues/comments/130847347","html_url":"https://github.com/sockeqwe/AdapterDelegates/issues/4#issuecomment-130847347","issue_url":"https://api.github.com/repos/sockeqwe/AdapterDelegates/issues/4","id":130847347,"user":{"login":"sockeqwe","id":583598,"avatar_url":"https://avatars.githubusercontent.com/u/583598?v=3","gravatar_id":"","url":"https://api.github.com/users/sockeqwe","html_url":"https://github.com/sockeqwe","followers_url":"https://api.github.com/users/sockeqwe/followers","following_url":"https://api.github.com/users/sockeqwe/following{/other_user}","gists_url":"https://api.github.com/users/sockeqwe/gists{/gist_id}","starred_url":"https://api.github.com/users/sockeqwe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sockeqwe/subscriptions","organizations_url":"https://api.github.com/users/sockeqwe/orgs","repos_url":"https://api.github.com/users/sockeqwe/repos","events_url":"https://api.github.com/users/sockeqwe/events{/privacy}","received_events_url":"https://api.github.com/users/sockeqwe/received_events","type":"User","site_admin":false},"created_at":"2015-08-13T21:18:15Z","updated_at":"2015-08-13T21:18:15Z","body":"I'm not sure if I inderstood your question correctly,  but your common code you want to share is `addItem()`, `removeItem()` and `clearlItems()` right? So in that case i think it's completely fine to.put that code in a base adapter class and extend from it as needed."}}