private int compare(
			final Phenotype<G, C> a,
			final Phenotype<G, C> b,
			final int i
		) {
			return _optimize == Optimize.MAXIMUM
				? _comparator.compare(a.fitness(), b.fitness(), i)
				: _comparator.compare(b.fitness(), a.fitness(), i);
		}
Collector of {@link Phenotype} objects, who's (multi-objective) fitness
value is part of the <a href="https://en.wikipedia.org/wiki/Pareto_efficiency">
    pareto front</a>.

@see #toParetoSet(IntRange)

@param size the allowed size range of the returned pareto set. If the
       size of the pareto set is bigger than {@code size.getMax()},
       during the collection, it is reduced to {@code size.getMin()}.
       Pareto set elements which are close to each other are removed first.
@param dominance the pareto dominance measure of the fitness result type
       {@code C}
@param comparator the comparator of the elements of the vector type
       {@code C}
@param distance the distance function of two elements of the vector
       type {@code C}
@param dimension the dimensionality of the result vector {@code C}.
       Usually {@code Vec::length}.
@param <G> the gene type
@param <C> the multi object result vector. E.g. {@code Vec<double[]>}
@return the pareto set collector
@throws NullPointerException if one the arguments is {@code null}
@throws IllegalArgumentException if the minimal pareto set {@code size}
        is smaller than one
jenetics.ext/src/main/java/io/jenetics/ext/moea/MOEA.java