CacheTagSet implements Set<CacheTag>, Serializable { public boolean removeAllByTagName(String name) { List<CacheTag> candidates = new ArrayList<CacheTag>(); for (CacheTag t : tags) { if (t.getName().equals(name)) candidates.add(t); } return tags.removeAll(candidates); } CacheTagSet();  CacheTagSet(CacheTag[] tags); CacheTag[] getTags(); boolean add(String key, String value); boolean add(CacheTag tag); boolean excludeTagsWith(String key); boolean excludeTagsWith(Collection<String> keys); boolean addAll(Collection<? extends CacheTag> c); void clear(); boolean contains(Object o); boolean containsAll(Collection<?> c); boolean isEmpty(); Iterator<CacheTag> iterator(); boolean remove(Object o); boolean remove(String name, Object value); boolean removeAll(Collection<?> c); boolean removeAllByTagName(String name); boolean retainAll(Collection<?> c); int size(); Object[] toArray(); T[] toArray(T[] a); String toString();  }
@Test public void testRemoveAllByTagName() { set.add(new CacheTagImpl("a", bValue)); set.removeAllByTagName("b"); assertEquals(3, set.size()); set.removeAllByTagName("a"); assertEquals(1, set.size()); }