利用stream流将一个对象集合转换成另一个对象集合!
List<BVideoHistory> bVideoHistoryList=new ArrayList<>();
List<BVideoRank> bVideoRankList = bilibiliRank.bVideoRankArraylist(0);
if (CollectionUtils.isNotEmpty(bVideoRankList)){
bVideoHistoryList=bVideoRankList.stream().map(bVideoRank->{
BVideoHistory bVideoHistory=new BVideoHistory();
bVideoHistory.setBvNumber(bVideoRank.getBvNumber());
bVideoHistory.setBvTitle(bVideoRank.getBvTitle());
bVideoHistory.setBvUp(bVideoRank.getBvUp());
bVideoHistory.setBvUpuuid(bVideoRank.getBvUpuuid());
return bVideoHistory;
}).collect(Collectors.toList());
}