is like this. There is an order list List < order > whose order contains several goods. Now you want to get the id,model structure of all goods in the order list as follows:
class order {
int id,
List < goods > goodsList;
}
class goods {
int id;
String name;
}
List < order > list.
you can get the id list of the order. The question now is how to get the list of items under all the list orders,
list.stream (). Map (c-> c.getId ()). Orders (Collectors.toList ()) < order >.
the following words do not seem to be correct
list.stream (). Map (c-> c.getGoodsList (). Stream (). Map (Q-> q.getId (). Collect (Collectors.toList ());