//使用 Stream 查找最长和最短曲目
List<Track> tracks = Arrays.asList(new Track("Bakai", 524),
new Track("Violets for Your Furs", 378),
new Track("Time Was", 451));
Track shortestTrack = tracks.stream()
.min(Comparator.comparing(track -> track.getLength()))
.get();
Track longestTrack = tracks.stream()
.max(Comparator.comparing(track -> track.getLength()))
.get();