public <F>void addViewType(Class<? extends F> clazz,ViewHolderFactory<? extends ViewHolder<? extends F>> factory){
  int id=mViewHolderFactoryRegistry.size();
  mViewHolderTypeRegistry.put(clazz,id);
  mViewHolderFactoryRegistry.put(id,factory);
}

public < F > void addViewType ( Class < ? extends F > clazz , ViewHolderFactory < ? extends ViewHolder < ? extends F > > factory ) { int id = mViewHolderFactoryRegistry . size ( ) ; mViewHolderTypeRegistry . put ( clazz , id ) ; mViewHolderFactoryRegistry . put ( id , factory ) ; }
register different type of data with different viewholder using viewholderfactory .
