public final <T>void insertInternal(List<T> list,T object,final int position){
  list.add(position,object);
  int g=position;
  if (hasHeaderView())   g++;
  notifyItemInserted(g);
}

public final < T > void insertInternal ( List < T > list , T object , final int position ) { list . add ( position , object ) ; int g = position ; if ( hasHeaderView ( ) ) g ++ ; notifyItemInserted ( g ) ; }
insert a item to the list of the adapter
