public static < G extends Gene < ? , G > , C extends Comparable < ? super C > > Collector < EvolutionResult < G , C > , ? , EvolutionResult < G , C > > toBestEvolutionResult ( ) { return Collector . of ( MinMax :: < EvolutionResult < G , C > > of , MinMax :: accept , MinMax :: combine , mm -> mm . getMax ( ) != null ? mm . getMax ( ) . withTotalGenerations ( mm . getCount ( ) ) : null ) ; }
Return a collector which collects the best result of an evolution stream .