ParetoFront extends AbstractSet<T> { @Override public boolean addAll(final Collection<? extends T> elements) { final int sum = elements.stream() .mapToInt(e -> add(e) ? 1 : 0) .sum(); return sum > 0; } ParetoFront(
		final Comparator<? super T> dominance,
		final BiPredicate<? super T, ? super T> equals
	);  ParetoFront(final Comparator<? super T> dominance); @Override boolean add(final T element); @Override boolean addAll(final Collection<? extends T> elements); ParetoFront<T> merge(final ParetoFront<? extends T> elements); ParetoFront<T> trim(
		final int size,
		final ElementComparator<? super T> comparator,
		final ElementDistance<? super T> distance,
		final ToIntFunction<? super T> dimension
	); @Override Iterator<T> iterator(); @Override int size(); @Override boolean isEmpty(); ISeq<T> toISeq(); static Collector<C, ?, ParetoFront<C>> toParetoFront(); static Collector<T, ?, ParetoFront<T>> toParetoFront(final Comparator<? super T> dominance);  }
@Test(invocationCount = 10) public void addAll() { final Random random = new Random(); final ParetoFront<Vec<double[]>> set = new ParetoFront<>(Vec::dominance); final List<Vec<double[]>> elements = IntStream.range(0, 500) .mapToObj(i -> circle(random)) .collect(Collectors.toList()); set.addAll(elements); Assert.assertEquals( new HashSet<>(set), new HashSet<>(Pareto.front(ISeq.of(elements)).asList()) ); }