List of usage examples for com.google.gwt.dev.util.collect HashMap containsKey
public boolean containsKey(Object key)
From source file:forplay.rebind.AutoClientBundleGenerator.java
License:Apache License
/** * Filter file set, preferring *.mp3 files where alternatives exist. */// w ww . jav a 2s.c om private HashSet<File> preferMp3(Set<File> files) { HashMap<String, File> map = new HashMap<String, File>(); for (File file : files) { String path = stripExtension(file.getPath()); if (file.getName().endsWith(".mp3") || !map.containsKey(path)) { map.put(path, file); } } return new HashSet<File>(map.values()); }