采用迭代器循环遍历删除
Set<String> s = new HashSet<String>();
s.add("a");
s.add("b");
s.add("c");
Iterator<String> it = s.iterator();
while(it.hasNext()){
String t = it.next();
if("a".equals(t)){
it.remove();
}
}