title: How to initialize FirebaseRecyclerOptions with Generic typed Class as Model1<Model2> in Android
body: <blockquote>
  <p>This is the main class that has a generic type:</p>
  </blockquote>
  <pre><code>public class MainClass&lt;T extends MainClass&gt;{
  
   //one of the parameters
   private TypeClass mType;
    
   //parameters
  
  }
  </code></pre>
  <blockquote>
  <p>This is the second class that be used for generic type to Main Class</p>
  </blockquote>
  <pre><code>public class TypeClass extends MainClass{
  
   //parameters
  
  }
  </code></pre>
  <blockquote>
  <p>And This is what I want to do, in onCreatView in MainActivity:</p>
  </blockquote>
  <pre><code>Query query = FirebaseDatabase.getInstance().getReference()    
  
  FirebaseRecyclerOptions options = new FirebaseRecyclerOptions.Builder&lt;Hesaplar&gt;()
              .setQuery(query,MainClass&lt;TypeClass&gt;.class)
              .build();
  
  recyclerView.setAdapter(new ExampleRecycViewAdapter(options));
  </code></pre>
  <blockquote>
  <p>As you know, normally this <code>.setQuery</code> method is used as <code>.setQuery(query,MainClass.class)</code></p>
  <p>But I coundt handle using <code>.setQuery</code> method as <code>.setQuery(query,MainClass&lt;TypeClass&gt;.class)</code></p>
  <p><strong>Because I need the object of   <code>mMain : MainClass&lt;TypeClass&gt;</code></strong></p>
  <p><strong>Could you help me?</strong></p>
  </blockquote>
  <p>(By the way, I'm sorry for my English, I hope I explained my issue)</p>