@Test public void testIterator() throws Exception { Set<Integer> validationSet = Sets.newHashSet(); fillSet(10, this.set); fillSet(10, validationSet); set.iterator().forEachRemaining(item -> assertTrue("Items were mismatched.", validationSet.remove(item))); assertTrue("All entries in the validation set should have been removed.", validationSet.isEmpty()); }
@Override public Iterator<E> iterator() { return Iterators.transform(items.iterator(), serializer::decode); }
PersistentSet implements Set<E> { @Override public Iterator<E> iterator() { return Iterators.transform(items.iterator(), serializer::decode); } }
PersistentSet implements Set<E> { @Override public Iterator<E> iterator() { return Iterators.transform(items.iterator(), serializer::decode); } PersistentSet(org.onosproject.store.service.Serializer serializer, DB database, String name); }
PersistentSet implements Set<E> { @Override public Iterator<E> iterator() { return Iterators.transform(items.iterator(), serializer::decode); } 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 Iterator<E> iterator() { return Iterators.transform(items.iterator(), serializer::decode); } 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();  }