@@ -0,0 +1,2221 @@
+/*%0A * Java Genetic Algorithm Library (@__identifier__@).%0A * Copyright (c) @__year__@ Franz Wilhelmst%C3%B6tter%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A *%0A * Author:%0A *    Franz Wilhelmst%C3%B6tter (franz.wilhelmstoetter@gmail.com)%0A */%0Apackage io.jenetics.util;%0A%0Aimport static java.util.Objects.requireNonNull;%0A%0Aimport java.util.Comparator;%0A%0A/**%0A * Object wrapper, which makes the wrapped value %7B@link Comparable%7D, by defining%0A * a separate %7B@link Comparator%7D.%0A *%0A * @param %3CT%3E the type of the wrapped object%0A *%0A * @author %3Ca href=%22mailto:franz.wilhelmstoetter@gmail.com%22%3EFranz Wilhelmst%C3%B6tter%3C/a%3E%0A * @version !__version__!%0A * @since !__version__!%0A */%0Apublic final class Ordered%3CT%3E implements Comparable%3COrdered%3CT%3E%3E %7B%0A%09private final T _value;%0A%09private final Comparator%3C? super T%3E _comparator;%0A%0A%09private Ordered(final T value, final Comparator%3C? super T%3E comparator) %7B%0A%09%09_value = value;%0A%09%09_comparator = requireNonNull(comparator);%0A%09%7D%0A%0A%09/**%0A%09 * Return the wrapped value.%0A%09 *%0A%09 * @return the wrapped value%0A%09 */%0A%09public T value() %7B%0A%09%09return _value;%0A%09%7D%0A%0A%09@Override%0A%09public int compareTo(final Ordered%3CT%3E other) %7B%0A%09%09return _comparator.compare(_value, other._value);%0A%09%7D%0A%0A%09/**%0A%09 * Make the given %7B@code value%7D comparable, by using the given%0A%09 * %7B@code comparator%7D.%0A%09 *%0A%09 * @param value the wrapped object, may be %7B@code null%7D%0A%09 * @param comparator the comparator used for comparing two value objects%0A%09 * @param %3CT%3E the type of the wrapped object%0A%09 * @return a new ordered object%0A%09 * @throws NullPointerException if the given %7B@code comparator%7D is%0A%09 *         %7B@code null%7D%0A%09 */%0A%09public static %3CT%3E Ordered%3CT%3E of(%0A%09%09final T value,%0A%09%09final Comparator%3C? super T%3E comparator%0A%09) %7B%0A%09%09return new Ordered%3C%3E(value, comparator);%0A%09%7D%0A%7D%0A

Add 'Ordered' class.