/*
 * 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;

import static org.jenetics.util.math.random.nextDouble;

import java.util.Comparator;

import org.jenetics.util.RandomRegistry;

/**
 * Implementation of the NumericGene which holds a 64 bit floating point number.
 *
 * @author <a href="mailto:franz.wilhelmstoetter@gmx.at">Franz Wilhelmstötter</a>
 * @version @__version__@ &mdash; <em>$Date: 2014-02-06 $</em>
 * @since @__version__@
 */
public final class DoubleGene extends NumericGene<Double, DoubleGene> {

	public DoubleGene(final Double value, final Double min, final Double max) {
		super(value, min, max, new Comparator<Double>() {
			@Override
			public int compare(final Double that, final Double other) {
				return that.compareTo(other);
			}
		});
	}

	@Override
	public DoubleGene newInstance(final Double value) {
		return new DoubleGene(value, _min, _max);
	}

	@Override
	public DoubleGene newInstance() {
		return newInstance(nextDouble(RandomRegistry.getRandom(), _min, _max));
	}

	@Override
	public DoubleGene mean(final DoubleGene that) {
		return newInstance(_value  + (that._value - _value)/2.0);
	}

}

@@ -1225,254 +1225,1262 @@
 %7B%0A%0A%09
-public DoubleGene(final Double value, final Double min, final Double max) %7B%0A%09%09super(value, min, max, new Comparator%3CDouble%3E() %7B%0A%09%09%09@Override%0A%09%09%09public int compare(final Double that, final Double other) %7B%0A%09%09%09%09return that.compareTo(other);%0A%09%09%09%7D%0A%09%09%7D
+/**%0A%09 * Create a new random %7B@code DoubleGene%7D with the given value and the%0A%09 * given range. If the %7B@code value%7D isn't within the interval %5Bmin, max),%0A%09 * no exception is thrown. In this case the method%0A%09 * %7B@link DoubleGene#isValid()%7D returns %7B@code false%7D.%0A%09 *%0A%09 * @param value the value of the gene.%0A%09 * @param min the minimal valid value of this gene (inclusively).%0A%09 * @param max the maximal valid value of this gene (exclusively).%0A%09 * @throws NullPointerException if one of the arguments is %7B@code null%7D.%0A%09 */%0A%09public DoubleGene(final Double value, final Double min, final Double max) %7B%0A%09%09super(value, min, max, new Comparator%3CDouble%3E() %7B%0A%09%09%09@Override%0A%09%09%09public int compare(final Double that, final Double other) %7B%0A%09%09%09%09return that.compareTo(other);%0A%09%09%09%7D%0A%09%09%7D);%0A%09%7D%0A%0A%09/**%0A%09 * Create a new random %7B@code DoubleGene%7D. It is guaranteed that the value%0A%09 * of the %7B@code DoubleGene%7D lies in the interval %5Bmin, max).%0A%09 *%0A%09 * @param min the minimal valid value of this gene (inclusively).%0A%09 * @param max the maximal valid value of this gene (exclusively).%0A%09 * @throws NullPointerException if one of the arguments is %7B@code null%7D.%0A%09 */%0A%09public DoubleGene(final Double min, final Double max) %7B%0A%09%09this(nextDouble(RandomRegistry.getRandom(), min, max), min, max
 );%0A%09

Add javadoc to 'DoubleGene'.