Trim code of minmaxBy
Update JavaDoc