title: How to pass a Recycler view adapter in a constructor?
body: <p>Let's say I have three Adapter like this and each has an interface defined in them i.e ClickListener which has a method onItemClick.</p>
  
  <pre><code>public class SearchResultAdapter extends RecyclerView.Adapter&lt;SearchResultAdapter.searchResultViewHolder&gt; 
  {
  
  ....
  public interface ClickListener {
      void onItemClick(int paramInt, View paramView);
  }
  
  }
  </code></pre>
  
  <p>How to pass the adapters to the constructor so I can get access to the ClickListener() method adapter inside the class.</p>
  
  <p><strong>Example</strong></p>
  
  <pre><code>public class ABC{
  
  private RecyclerView.Adapter adapter;
  
  public ABC(RecyclerView.Adapter adapter){
  this.adapter = adapter;
  }
  
  private void xyz(){
  
  //How to achieve this
  recyclerView.setOnClickListener(new adapter.ClickListener(){
  
  @Override
          public void onItemClick(int position, View v) {
  
          }
      });   
  
  }
  </code></pre>