我是 Java 新手,正在解决一个问题,我需要根据下面的匹配键对集合进行分组和聚合,这个键是来自下面提到的类的属性的组合。
class MyKey {
String planYearMonth;
String carSeries;
String weekNo;
String factoryCode;
String lineClass;
String frameSortCode;
String ocfClassificationCode;
String locationIdentificationCode;
String carGroup;
//setters & getters
//equals & hashcode
}
public class OCFIdentificationInfo {
private String frameSortCode;
private String ocfClassificationCode;
private String locationIdentificationCode;
private String carGroup;
private String frameCode;
//getters
//setters
//hashCode
//equals
//toString
}
public class DailyOCF {
private String planYearMonth;
private String carSeries;
private String weekNo;
private String day;
private String factoryCode;
private String lineClass;
private OCFIdentificationInfo …
Run Code Online (Sandbox Code Playgroud)