public static synchronized int insertProviderAt(Provider provider,int position){
  int size=providers.size();
  if ((position < 1) || (position > size)) {
    position=size + 1;
  }
  providers.add(position - 1,provider);
  providersNames.put(provider.getName(),provider);
  setNeedRefresh();
  return position;
}

public static synchronized int insertProviderAt ( Provider provider , int position ) { int size = providers . size ( ) ; if ( ( position < 1 ) || ( position > size ) ) { position = size + 1 ; } providers . add ( position - 1 , provider ) ; providersNames . put ( provider . getName ( ) , provider ) ; setNeedRefresh ( ) ; return position ; }
inserts a provider at a specified 1 - based position .
