/*
 * Java Genetic Algorithm Library (@__identifier__@).
 * Copyright (c) @__year__@ Franz Wilhelmstötter
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Author:
 *    Franz Wilhelmstötter (franz.wilhelmstoetter@gmail.com)
 */
package io.jenetics.ext.util;

import java.util.Comparator;

/**
 * @author <a href="mailto:franz.wilhelmstoetter@gmail.com">Franz Wilhelmstötter</a>
 * @version !__version__!
 * @since !__version__!
 */
@FunctionalInterface
public interface ComponentComparator<T> {

	public int compare(final T a, final T b, final int index);

	public default Comparator<T> curry(final int index) {
		return (a, b) -> compare(a, b, index);
	}

}

@@ -802,16 +802,118 @@
 r;%0A%0A/**%0A
+ * Defines the order of the components of a given type %7B@code T%7D.%0A *%0A * @param %3CV%3E the vector type%0A *%0A
  * @auth
@@ -1105,14 +1105,597 @@
 tor%3C
-T
+V
 %3E %7B%0A%0A
+%09/**%0A%09 * Compares the components of %7B@code a%7D and %7B@code b%7D at the given%0A%09 * %7B@code index%7D.%0A%09 *%0A%09 * @param u the first vector%0A%09 * @param v the second vector%0A%09 * @param index the vector index%0A%09 * @return a negative integer, zero, or a positive integer as the%0A%09 *         first argument is less than, equal to, or greater than the%0A%09 *         second.%0A%09 * @throws NullPointerException if either %7B@code a%7D or %7B@code b%7D is%0A%09 *        %7B@code null%7D%0A%09 * @throws IndexOutOfBoundsException if the index is out of range%0A%09 *         (index %3C 0 %7C%7C index %3E= length(a)  %7C%7C index %3E= length(b))%0A%09 */%0A
 %09pub
@@ -1720,19 +1720,19 @@
 nal 
-T a
+V u
 , final 
 T b,
@@ -1731,11 +1731,11 @@
 nal 
-T b
+V v
 , fi
@@ -1751,16 +1751,258 @@
 ndex);%0A%0A
+%09/**%0A%09 * Return a comparator which takes the component at the give %7B@code index%7D%0A%09 * for comparison two objects of type %7B@code T%7D.%0A%09 *%0A%09 * @param index the component index%0A%09 * @return the component comparator for the given %7B@code index%7D%0A%09 */%0A
 %09public 
@@ -2020,17 +2020,17 @@
 parator%3C
-T
+V
 %3E curry(

Add Javadoc.