Java Map Remove removeOutStringsStrings(Map map, String newString)

Here you can find the source of removeOutStringsStrings(Map map, String newString)

Description

Remove um string da tabela de espalhamento caso seja igual ao parametro 'newString'

License

Apache License

Parameter

Parameter Description
vehiclesMap a parameter

Declaration

public static void removeOutStringsStrings(Map<String, String> map, String newString) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Iterator;

import java.util.Map;
import java.util.Map.Entry;

public class Main {
    /**/*from  w  ww  .  ja  v a 2 s  .c  o m*/
     * Remove um string da tabela de espalhamento caso seja igual ao parametro 'newString'
     * 
     * @param vehiclesMap
     */
    public static void removeOutStringsStrings(Map<String, String> map, String newString) {
        for (Iterator<Entry<String, String>> iterator = map.entrySet().iterator(); iterator.hasNext();) {
            Map.Entry<String, String> entry = (Map.Entry<String, String>) iterator.next();
            String key = entry.getKey();
            //         List<String> value = entry.getValue();

            if (key.equals(newString)) {
                iterator.remove();
            }
        }

        //      System.out.println("Lista: " + vehicles.size());
    }
}

Related

  1. removeNullPair(Map map)
  2. removeNullValues(final Map parameters)
  3. removeNullValues(Map map)
  4. removeObject(Map map, T key)
  5. removeObjectProperty(Map properties, String key, Object defaultValue)
  6. removeParamsForAlipaySign(Map map)
  7. removeParentBeans(Map parentBeans, Map beans)
  8. removePrivateColumns( Map contentValues)
  9. removeRownum(List> rows)