/*
 * 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.internal.engine;

import static java.util.Objects.requireNonNull;
import static org.jenetics.internal.util.Equality.eq;

import java.io.Serializable;

import org.jenetics.internal.util.Equality;
import org.jenetics.internal.util.Hash;

import org.jenetics.Gene;
import org.jenetics.Population;

/**
 * Represents a state of the GA.
 *
 * @param <G> the gene type
 * @param <C> the fitness type
 *
 * @author <a href="mailto:franz.wilhelmstoetter@gmx.at">Franz Wilhelmstötter</a>
 * @since 3.0
 * @version 3.0 &mdash; <em>$Date: 2014-08-19 $</em>
 */
public final class EvolutionStart<
	G extends Gene<?, G>,
	C extends Comparable<? super C>
>
	implements Serializable
{
	private static final long serialVersionUID = 1L;

	private final Population<G, C> _population;
	private final int _generation;

	private EvolutionStart(
		final Population<G, C> population,
		final int generation
	) {
		_population = requireNonNull(population);
		_generation = generation;
	}

	public Population<G, C> getPopulation() {
		return _population;
	}

	public int getGeneration() {
		return _generation;
	}

	@Override
	public int hashCode() {
		return Hash.of(getClass())
			.and(_population)
			.and(_generation).value();
	}

	@Override
	public boolean equals(final Object obj) {
		return Equality.of(this, obj).test(start ->
			eq(_population, start._population) &&
			eq(_generation, start._generation)
		);
	}

	public static <G extends Gene<?, G>, C extends Comparable<? super C>>
	EvolutionStart<G, C> of(
		final Population<G, C> population,
		final int generation
	) {
		return new EvolutionStart<>(population, generation);
	}
}

@@ -1293,12 +1293,12 @@
 14-0
-8-19
+9-03
  $%3C/
@@ -1725,75 +1725,239 @@
 %7D%0A%0A%09
-public Population%3CG, C%3E getPopulation() %7B%0A%09%09return _population;%0A%09%7D%0A
+/**%0A%09 * Return the start population.%0A%09 *%0A%09 * @return the start population%0A%09 */%0A%09public Population%3CG, C%3E getPopulation() %7B%0A%09%09return _population;%0A%09%7D%0A%0A%09/**%0A%09 * Return the current generation.%0A%09 *%0A%09 * @return the current generation%0A%09 */
 %0A%09pu
@@ -2317,16 +2317,392 @@
 %09);%0A%09%7D%0A%0A
+%09/**%0A%09 * Create a new %7B@code EvolutionStart%7D object from the given values.%0A%09 *%0A%09 * @param population the start population%0A%09 * @param generation the current generation%0A%09 * @param %3CG%3E the gene type%0A%09 * @param %3CC%3E the fitness type%0A%09 * @return a new evolution start object%0A%09 * @throws java.lang.NullPointerException if the give %7B@code population%7D is%0A%09 *         %7B@code null%7D%0A%09 */%0A
 %09public 

Add javadoc.