/*
 * 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.object.hashCodeOf;

import java.io.Serializable;

import org.jenetics.util.Array;
import org.jenetics.util.ISeq;

/**
 * @author <a href="mailto:franz.wilhelmstoetter@gmx.at">Franz Wilhelmstötter</a>
 * @version @__version__@ &mdash; <em>$Date: 2014-02-10 $</em>
 * @since @__version__@
 */
public class LongChromosome
	extends NumericChromosome<Long, LongGene>
	implements Serializable
{
	private static final long serialVersionUID = 1L;


	protected LongChromosome(final ISeq<LongGene> genes) {
		super(genes);
	}

	/**
	 * Create a new random {@code LongChromosome}.
	 *
	 * @param min the min value of the {@link DoubleGene}s (inclusively).
	 * @param max the max value of the {@link DoubleGene}s (inclusively).
	 * @param length the length of the chromosome.
	 */
	public LongChromosome(final Long min,final Long max,final int length) {
		this(
			new Array<LongGene>(length).fill(LongGene.of(min, max)).toISeq()
		);
		_valid = true;
	}

	/**
	 * Create a new random {@code LongChromosome} of length one.
	 *
	 * @param min the minimal value of this chromosome (inclusively).
	 * @param max the maximal value of this chromosome (inclusively).
	 */
	public LongChromosome(final Long min, final Long max) {
		this(min, max, 1);
	}

	@Override
	public LongChromosome newInstance(final ISeq<LongGene> genes) {
		return new LongChromosome(genes);
	}

	@Override
	public LongChromosome newInstance() {
		return new LongChromosome(_min, _max, length());
	}

	@Override
	public int hashCode() {
		return hashCodeOf(getClass()).and(super.hashCode()).value();
	}

	@Override
	public boolean equals(final Object o) {
		return o == this || o instanceof LongChromosome && super.equals(o);
	}
}

@@ -1398,38 +1398,36 @@
 e of the %7B@link 
-Double
+Long
 Gene%7Ds (inclusiv
@@ -1479,14 +1479,12 @@
 ink 
-Double
+Long
 Gene
@@ -1549,16 +1549,90 @@
 mosome.%0A
+%09 * @throws NullPointerException if one of the arguments is %7B@code null%7D.%0A
 %09 */%0A%09pu
@@ -2008,16 +2008,90 @@
 ively).%0A
+%09 * @throws NullPointerException if one of the arguments is %7B@code null%7D.%0A
 %09 */%0A%09pu
@@ -2163,24 +2163,804 @@
  max, 1);%0A%09%7D
+%0A%09%0A%09/**%0A%09 * Create a new random %7B@code LongChromosome%7D.%0A%09 *%0A%09 * @param min the min value of the %7B@link LongGene%7Ds (inclusively).%0A%09 * @param max the max value of the %7B@link LongGene%7Ds (inclusively).%0A%09 * @param length the length of the chromosome.%0A%09 */%0A%09public static LongChromosome of(final long min, final long max, final int length) %7B%0A%09%09return new LongChromosome(min, max, length);%0A%09%7D%0A%09%0A%09/**%0A%09 * Create a new random %7B@code LongChromosome%7D of length one.%0A%09 *%0A%09 * @param min the minimal value of this chromosome (inclusively).%0A%09 * @param max the maximal value of this chromosome (inclusively).%0A%09 * @throws NullPointerException if one of the arguments is %7B@code null%7D.%0A%09 */%0A%09public static LongChromosome of(final long min, final long max) %7B%0A%09%09return new LongChromosome(min, max);%0A%09%7D
 %0A%0A%09@Override

Add factory methods.