@Test public void testContainsAll() throws Exception { Set<Integer> integersToCheck = Sets.newHashSet(); fillSet(10, integersToCheck); fillSet(10, set); assertTrue("The sets should be identical so mutual subsets.", set.containsAll(integersToCheck)); set.remove(9); assertFalse("The set should contain one fewer value.", set.containsAll(integersToCheck)); }
@Override public boolean containsAll(Collection<?> c) { checkNotNull(c, "Collection cannot be internal."); for (Object item : c) { if (!items.contains(serializer.encode(item))) { return false; } } return true; }
PersistentSet implements Set<E> { @Override public boolean containsAll(Collection<?> c) { checkNotNull(c, "Collection cannot be internal."); for (Object item : c) { if (!items.contains(serializer.encode(item))) { return false; } } return true; } }
PersistentSet implements Set<E> { @Override public boolean containsAll(Collection<?> c) { checkNotNull(c, "Collection cannot be internal."); for (Object item : c) { if (!items.contains(serializer.encode(item))) { return false; } } return true; } PersistentSet(org.onosproject.store.service.Serializer serializer, DB database, String name); }
PersistentSet implements Set<E> { @Override public boolean containsAll(Collection<?> c) { checkNotNull(c, "Collection cannot be internal."); for (Object item : c) { if (!items.contains(serializer.encode(item))) { return false; } } return true; } PersistentSet(org.onosproject.store.service.Serializer serializer, DB database, String name); void readInto(Set<E> items); @Override int size(); @Override boolean isEmpty(); @Override boolean contains(Object o); @Override Iterator<E> iterator(); @Override Object[] toArray(); @Override T[] toArray(T[] a); @Override boolean add(E item); @Override boolean remove(Object o); @Override boolean containsAll(Collection<?> c); @Override boolean addAll(Collection<? extends E> c); @Override boolean retainAll(Collection<?> c); @Override boolean removeAll(Collection<?> c); @Override void clear(); @Override boolean equals(Object set); @Override int hashCode(); }
PersistentSet implements Set<E> { @Override public boolean containsAll(Collection<?> c) { checkNotNull(c, "Collection cannot be internal."); for (Object item : c) { if (!items.contains(serializer.encode(item))) { return false; } } return true; } PersistentSet(org.onosproject.store.service.Serializer serializer, DB database, String name); void readInto(Set<E> items); @Override int size(); @Override boolean isEmpty(); @Override boolean contains(Object o); @Override Iterator<E> iterator(); @Override Object[] toArray(); @Override T[] toArray(T[] a); @Override boolean add(E item); @Override boolean remove(Object o); @Override boolean containsAll(Collection<?> c); @Override boolean addAll(Collection<? extends E> c); @Override boolean retainAll(Collection<?> c); @Override boolean removeAll(Collection<?> c); @Override void clear(); @Override boolean equals(Object set); @Override int hashCode();  }