@Test public void intStream() { final IntegerChromosome chromosome = IntegerChromosome.of(0, 10_000, 1000); final int[] values = chromosome.intStream().toArray(); Assert.assertEquals(values.length, 1000); for (int i = 0; i < values.length; ++i) { Assert.assertEquals(chromosome.get(i).intValue(), values[i]); Assert.assertEquals(chromosome.intValue(i), values[i]); } }
public IntStream intStream() { return IntStream.range(0, length()).map(this::intValue); }
IntegerChromosome extends AbstractBoundedChromosome<Integer, IntegerGene> implements
			NumericChromosome<Integer, IntegerGene>,
			Serializable { public IntStream intStream() { return IntStream.range(0, length()).map(this::intValue); } }
IntegerChromosome extends AbstractBoundedChromosome<Integer, IntegerGene> implements
			NumericChromosome<Integer, IntegerGene>,
			Serializable { public IntStream intStream() { return IntStream.range(0, length()).map(this::intValue); } protected  IntegerChromosome(
		final ISeq<IntegerGene> genes,
		final IntRange lengthRange
	); }
IntegerChromosome extends AbstractBoundedChromosome<Integer, IntegerGene> implements
			NumericChromosome<Integer, IntegerGene>,
			Serializable { public IntStream intStream() { return IntStream.range(0, length()).map(this::intValue); } protected  IntegerChromosome(
		final ISeq<IntegerGene> genes,
		final IntRange lengthRange
	); @Override IntegerChromosome newInstance(final ISeq<IntegerGene> genes); @Override IntegerChromosome newInstance(); IntegerChromosome map(final Function<? super int[], int[]> f); IntStream intStream(); int[] toArray(final int[] array); int[] toArray(); static IntegerChromosome of(final IntegerGene... genes); static IntegerChromosome of(final Iterable<IntegerGene> genes); static IntegerChromosome of(
		final int min,
		final int max,
		final IntRange lengthRange
	); static IntegerChromosome of(
		final int min,
		final int max,
		final int length
	); static IntegerChromosome of(
		final IntRange range,
		final IntRange lengthRange
	); static IntegerChromosome of(final IntRange range, final int length); static IntegerChromosome of(final int min, final int max); static IntegerChromosome of(final IntRange range); }
IntegerChromosome extends AbstractBoundedChromosome<Integer, IntegerGene> implements
			NumericChromosome<Integer, IntegerGene>,
			Serializable { public IntStream intStream() { return IntStream.range(0, length()).map(this::intValue); } protected  IntegerChromosome(
		final ISeq<IntegerGene> genes,
		final IntRange lengthRange
	); @Override IntegerChromosome newInstance(final ISeq<IntegerGene> genes); @Override IntegerChromosome newInstance(); IntegerChromosome map(final Function<? super int[], int[]> f); IntStream intStream(); int[] toArray(final int[] array); int[] toArray(); static IntegerChromosome of(final IntegerGene... genes); static IntegerChromosome of(final Iterable<IntegerGene> genes); static IntegerChromosome of(
		final int min,
		final int max,
		final IntRange lengthRange
	); static IntegerChromosome of(
		final int min,
		final int max,
		final int length
	); static IntegerChromosome of(
		final IntRange range,
		final IntRange lengthRange
	); static IntegerChromosome of(final IntRange range, final int length); static IntegerChromosome of(final int min, final int max); static IntegerChromosome of(final IntRange range);  }