Interface Factory<T>

Type Parameters:
T - the object type this factory creates.
All Known Subinterfaces:
BoundedChromosome<A,G>, BoundedGene<A,G>, Chromosome<G>, Gene<A,G>, NumericChromosome<N,G>, NumericGene<N,G>
All Known Implementing Classes:
AbstractChromosome, AnyChromosome, AnyGene, BitChromosome, BitGene, CharacterChromosome, CharacterGene, DoubleChromosome, DoubleGene, EnumGene, Genotype, IntegerChromosome, IntegerGene, LongChromosome, LongGene, PermutationChromosome
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Factory<T>
Since:
1.0
Version:
3.0
  • Method Summary

    Modifier and Type
    Method
    Description
    default Stream<T>
    Return a new stream of object instances, created by this factory.
    Create a new instance of type T.
  • Method Details

    • newInstance

      Create a new instance of type T.
      Returns:
      a new instance of type T
    • instances

      default Stream<T> instances()
      Return a new stream of object instances, created by this factory.
      Returns:
      a stream of objects, created by this factory
      Since:
      3.0