title: How can I set LIMIT in query in Realm?
body: <p>I have done R&amp;D for limit in query with no success. There is one way with which to paginate data in <code>Realm</code> with sub list but no success with that. It shows duplicate value in it.</p>
  
  <p>Here is what I attempted for pagination.</p>
  
  <pre><code> RealmResults&lt;Person&gt; mPersonData=RealmUtils.getAllPersonWithTagsDescending(); 
      if (mPersonData != null) { 
      int startPos=getAllPerson.size()-1; 
      int endPos=mPersonData.size()-1; 
      List&lt;Person&gt; newPersonData=mPersonData.subList(startPos,endPos);   
      getAllPerson.addAll(newPersonData); 
      mAdapter.notifyDataSetChanged(); 
  }
  </code></pre>
  
  <p>What am I doing wrong?</p>