Stream を使用してエンティティ クラスをマップ データ型に収集します: (id: エンティティ クラス) コードは次のとおりです。
Map<String, Units> orderAdvancePaymentDetailMap = units.stream()
.collect(Collectors.toMap(Units::getName, Function.identity()));
Stream を使用してエンティティ クラスをマップ データ型に収集します: (id: エンティティ クラス) コードは次のとおりです。
Map<String, Units> orderAdvancePaymentDetailMap = units.stream()
.collect(Collectors.toMap(Units::getName, Function.identity()));