question: public OptionalInt maxByInt ( IntUnaryOperator keyExtractor ) { int [ ] result = collect ( null , null , null ) ; return result [ 2 ] == 1 ? OptionalInt . of ( result [ 0 ] ) : OptionalInt . empty ( ) ; }
target:  Returns the maximum element of this stream according to the provided key extractor function. <p> This is a terminal operation.