code: public static <T> T max(T lhs, T rhs, Comparator<T> comparator) {
          return BinaryOperator.maxBy(comparator).apply(lhs, rhs);
      }
docs: Evaluates max of two elements.
  
  @param <T> the element type
  @param lhs the left element
  @param rhs the right element
  @param comparator the comparator used to compare elements
  @return the greater element