private void cacheSizes(){
  mAdapterSizes.clear();
  int size=0;
  if (mAdapters.size() > 0) {
    mAdapterSizes.put(0,mAdapters.valueAt(0));
  }
  for (  IAdapter<Item> adapter : mAdapters.values()) {
    if (adapter.getAdapterItemCount() > 0) {
      mAdapterSizes.put(size,adapter);
      size=size + adapter.getAdapterItemCount();
    }
  }
  mGlobalSize=size;
}

private void cacheSizes ( ) { mAdapterSizes . clear ( ) ; int size = 0 ; if ( mAdapters . size ( ) > 0 ) { mAdapterSizes . put ( 0 , mAdapters . valueAt ( 0 ) ) ; } for ( IAdapter < Item > adapter : mAdapters . values ( ) ) { if ( adapter . getAdapterItemCount ( ) > 0 ) { mAdapterSizes . put ( size , adapter ) ; size = size + adapter . getAdapterItemCount ( ) ; } } mGlobalSize = size ; }
we cache the sizes of our adapters so get accesses are faster
