/*
 * 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@gmx.at)
 */
package org.jenetics.engine;

import java.util.function.Function;

import org.jenetics.Gene;

/**
 * @author <a href="mailto:franz.wilhelmstoetter@gmx.at">Franz Wilhelmstötter</a>
 * @version !__version__!
 * @since !__version__!
 */
public interface Problem<
	T,
	G extends Gene<?, G>,
	C extends Comparable<? super C>
>
{

	public Function<T, C> fitness();

	public Codec<T, G> codec();

	public static <T, G extends Gene<?, G>, C extends Comparable<? super C>>
	Problem<T, G, C> of(final Function<T, C> fitness, final Codec<T, G>
		codec)  {
		return new Problem<T, G, C>() {
			@Override
			public Codec<T, G> codec() {
				return codec;
			}

			@Override
			public Function<T, C> fitness() {
				return fitness;
			}
		};
	}

}


@@ -764,16 +764,65 @@
 ngine;%0A%0A
+import static java.util.Objects.requireNonNull;%0A%0A
 import j
@@ -888,296 +888,1494 @@
 %0A * 
-@author %3Ca href=%22mailto:franz.wilhelmstoetter@gmx.at%22%3EFranz Wilhelmst%C3%B6tter%3C/a%3E%0A * @version !__version__!%0A * @since !__version__!%0A */%0Apublic interface Problem%3C%0A%09T,%0A%09G extends Gene%3C?, G%3E,%0A%09C extends Comparable%3C? super C%3E%0A%3E%0A%7B%0A%0A%09public Function%3CT, C%3E fitness();%0A%0A%09public Codec%3CT, G%3E codec();%0A
+This interface describes a %3Ci%3Eproblem%3C/i%3E which can be solved by the GA%0A * evolution %7B@code Engine%7D. It connects the actual %7B@link #fitness()%7D function%0A * and the needed %7B@link #codec()%7D.%0A *%0A * @see Codec%0A * @see Engine%0A *%0A * @param %3CT%3E the (%3Ci%3Enative%3C/i%3E) argument type of the problem fitness function%0A * @param %3CG%3E the gene type the evolution engine is working with%0A * @param %3CC%3E the result type of the fitness function%0A *%0A * @author %3Ca href=%22mailto:franz.wilhelmstoetter@gmx.at%22%3EFranz Wilhelmst%C3%B6tter%3C/a%3E%0A * @version !__version__!%0A * @since !__version__!%0A */%0Apublic interface Problem%3C%0A%09T,%0A%09G extends Gene%3C?, G%3E,%0A%09C extends Comparable%3C? super C%3E%0A%3E%0A%7B%0A%0A%09/**%0A%09 * Return the fitness function of the %3Ci%3Eproblem%3C/i%3E in the %3Ci%3Enative%3C/i%3E%0A%09 * problem domain.%0A%09 *%0A%09 * @return the fitness function%0A%09 */%0A%09public Function%3CT, C%3E fitness();%0A%0A%09/**%0A%09 * Return the codec, which translates the types of the problem domain into%0A%09 * types, which can be understand by the evolution %7B@code Engine%7D.%0A%09 *%0A%09 * @return the engine codec%0A%09 */%0A%09public Codec%3CT, G%3E codec();%0A%0A%0A%09/**%0A%09 *%0A%09 * @param fitness the problem fitness function%0A%09 * @param codec the evolution engine codec%0A%09 * @param %3CT%3E the (%3Ci%3Enative%3C/i%3E) argument type of the problem fitness function%0A%09 * @param %3CG%3E the gene type the evolution engine is working with%0A%09 * @param %3CC%3E the result type of the fitness function%0A%09 * @return a new problem object from the given parameters%0A%09 * @throws NullPointerException if one of the arguments is %7B@code null%7D%0A%09 */
 %0A%09pu
@@ -2517,20 +2517,70 @@
 , G%3E
-%0A%09%09
+ codec) %7B%0A%09%09requireNonNull(fitness);%0A%09%09requireNonNull(
 codec)
-  %7B
+;%0A
 %0A%09%09r

Add javadoc.