Comparator Assignment

From CSE231 Wiki
Revision as of 17:17, 2 November 2021 by Cosgroved (talk | contribs)
Jump to navigation Jump to search

Group Assignment

This is a group assignment.

Background

Comparator<T>

Optional<T>

HockeyPlayer

Code To Implement

CompareUtils

min

public static <E> Optional<E> min(E[] array, Comparator<E> comparator)

CompareApps

closestTo

public static Optional<Integer> closestTo(Integer[] values, int target)

youngest

public static Optional<HockeyPlayer> youngest(HockeyPlayer[] players)

mostPoints

public static Optional<HockeyPlayer> mostPoints(HockeyPlayer[] players)