/** * Ensures that the specified <var>viewHolder</var> has updated position to the specified one. * <p> * <b>Note</b>, that position will be updated only for holder instance of {@link ViewHolder}. * * @param viewHolder The view holder of which position to update. * @param position The position of the holder. */ final void ensureViewHolderPosition(Object viewHolder, int position) { if (viewHolder instanceof ViewHolder) ((ViewHolder) viewHolder).updateAdapterPosition(position); }
/** * Ensures that the specified <var>viewHolder</var> has updated position to the specified one. * <p> * <b>Note</b>, that position will be updated only for holder instance of {@link ViewHolder}. * * @param viewHolder The view holder of which position to update. * @param position The position of the holder. */ final void ensureViewHolderPosition(Object viewHolder, int position) { if (viewHolder instanceof ViewHolder) ((ViewHolder) viewHolder).updateAdapterPosition(position); }