0
SimpleFlatMapper庫能夠映射數據和POJO對象,但是我想知道它是否可以在POJO對象和Map之間映射?SimpleFlatMapper對象到對象映射
這讓我可以在庫(https://github.com/markash/komparator),我忙着進行比較,並最終目的使用它是能夠做到以下幾點: -
List<BusinessPojo> firstList = ...;
DataRecordSet recordSet01 =
ObjectParser
.mapTo(Map.class)
.stream(firstList, convertToDataRecord)
.collect(DataRecordSet.collect);
List<BusinessPojo> secondList = ...;
DataRecordSet recordSet02 =
ObjectParser
.mapTo(Map.class)
.stream(secondList, convertToDataRecord)
.collect(DataRecordSet.collect);
List<DataDifferences> results = recordSet01.compareWith(recordSet02);
視覺最終結果是https://mpashworth.wordpress.com/2017/07/09/calculating-string-differences/