title: Is this just boilerplate code for a custom pager adapter implementation?
body: <p>In order for a <code>PagerAdapter</code> implementation to work properly the following should be implemented in the custom adapter derived class.  </p>
  
  <pre><code> @Override
   public boolean isViewFromObject(@NonNull View view, @NonNull Object object) {  
          return view == object;  
   }  
  
   @Override
   public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {  
          container.removeView((View) object);  
      }  
  }  
  </code></pre>
  
  <p>This seems to me just boilerplate code.<br>
  Why should that be done in the derived class? Is there a reason for this code not being part of the <code>PagerAdapter</code> and the derived class overrides it with something else only when (if) needed? When would that be?</p>