@Test public void updateWithNondominated() { Individual individual = mock(Individual.class); UnboundedArchive archive = new UnboundedArchive(); Assert.assertFalse(archive.iterator().hasNext()); Assert.assertTrue(archive.updateWithNondominated(Collections.singleton(individual))); Assert.assertTrue(archive.iterator().hasNext()); Assert.assertEquals(archive.iterator().next(), individual); }
@Override protected boolean updateWithNondominated(Collection<Individual> candidates) { boolean changed = false; for (Individual i : candidates) { if (!contains(i)) { changed |= addCheckedIndividual(i); } } return changed; }
UnboundedArchive extends AbstractArchive { @Override protected boolean updateWithNondominated(Collection<Individual> candidates) { boolean changed = false; for (Individual i : candidates) { if (!contains(i)) { changed |= addCheckedIndividual(i); } } return changed; } }
UnboundedArchive extends AbstractArchive { @Override protected boolean updateWithNondominated(Collection<Individual> candidates) { boolean changed = false; for (Individual i : candidates) { if (!contains(i)) { changed |= addCheckedIndividual(i); } } return changed; }  }
UnboundedArchive extends AbstractArchive { @Override protected boolean updateWithNondominated(Collection<Individual> candidates) { boolean changed = false; for (Individual i : candidates) { if (!contains(i)) { changed |= addCheckedIndividual(i); } } return changed; }   }
UnboundedArchive extends AbstractArchive { @Override protected boolean updateWithNondominated(Collection<Individual> candidates) { boolean changed = false; for (Individual i : candidates) { if (!contains(i)) { changed |= addCheckedIndividual(i); } } return changed; }    }