2019-10-18から1日間の記事一覧

Java 複数要素ソートのおさらい

1つの要素ソートであれば、単純な例 public class Foo{ public Integer width; public Integer height; public Integer depth; } List<Foo> list; // list 生成後、、 list.stream().sorted((a, b)->a.width.compareTo(b.width)) width -> height -> depth の順</foo>…