Code example for Provider

Methods: getName

0
    public static 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;
    } 
 
    /*** 
     * Removes the provider 
     *  
     * @param providerNumber 
     */ 
    public static void removeProvider(int providerNumber) {
        Provider p = providers.remove(providerNumber - 1);
        providersNames.remove(p.getName());
        setNeedRefresh(); 
    }