Module io.jenetics.base
Package io.jenetics.internal.engine
Class EvolutionSpliterator<G extends Gene<?,G>,C extends Comparable<? super C>>
java.lang.Object
io.jenetics.internal.engine.EvolutionSpliterator<G,C>
- Type Parameters:
G
- the gene typeC
- the evolution result type
- All Implemented Interfaces:
Spliterator<EvolutionResult<G,
C>>
public final class EvolutionSpliterator<G extends Gene<?,G>,C extends Comparable<? super C>>
extends Object
implements Spliterator<EvolutionResult<G,C>>
The
Spliterator
implementation of the EvolutionStream
.- Since:
- 3.0
- Version:
- 5.1
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.Spliterator
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T extends Object,
T_CONS extends Object, T_SPLITR extends Spliterator.OfPrimitive<T, T_CONS, T_SPLITR>> -
Field Summary
Fields inherited from interface java.util.Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED
-
Constructor Summary
ConstructorDescriptionEvolutionSpliterator
(Supplier<EvolutionStart<G, C>> start, Evolution<G, C> evolution) Create a new evolution spliterator with the givenstart
element and theevolution
function. -
Method Summary
Modifier and TypeMethodDescriptionint
long
static <G extends Gene<?,
G>, C extends Comparable<? super C>>
EvolutionSpliterator<G,C> of
(Supplier<EvolutionStart<G, C>> start, Function<? super EvolutionStart<G, C>, ? extends Evolution<G, C>> evolution) Create a new spliterator with the givenstart
element and theevolution
function-function.boolean
tryAdvance
(Consumer<? super EvolutionResult<G, C>> action) trySplit()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Spliterator
forEachRemaining, getComparator, getExactSizeIfKnown, hasCharacteristics
-
Constructor Details
-
EvolutionSpliterator
Create a new evolution spliterator with the givenstart
element and theevolution
function.- Parameters:
start
- the start elementevolution
- the evolution function- Throws:
NullPointerException
- if one of the arguments isnull
-
-
Method Details
-
tryAdvance
- Specified by:
tryAdvance
in interfaceSpliterator<G extends Gene<?,
G>>
-
trySplit
- Specified by:
trySplit
in interfaceSpliterator<G extends Gene<?,
G>>
-
estimateSize
- Specified by:
estimateSize
in interfaceSpliterator<G extends Gene<?,
G>>
-
characteristics
- Specified by:
characteristics
in interfaceSpliterator<G extends Gene<?,
G>>
-
of
public static <G extends Gene<?,G>, EvolutionSpliterator<G,C extends Comparable<? super C>> C> of(Supplier<EvolutionStart<G, C>> start, Function<? super EvolutionStart<G, C>, ? extends Evolution<G, C>> evolution) Create a new spliterator with the givenstart
element and theevolution
function-function.- Type Parameters:
G
- the gene typeC
- the evolution result type- Parameters:
start
- the start elementevolution
- the evolution function-function- Returns:
- a new evolution spliterator
- Since:
- 5.1
-