Compare the List of different Objects and build the new list of Object in java8 using Stream
Compare the List of different Objects and build the new list of Object in java8 using Stream Could someone help me converting the below code to java 8 standards using streams. Iterate CustomerRelationship list and customer list,compare customerRelationShip firstName with customer firstName. if it matches then construct the BusinessCustomer object using customerRelationShip and customer object and add it to businessCustomerList. if no matches then construct BusinessCustomer using customerRelationShip and add it to businessCustomerList. List<BusinessCustomer> businessCustomers = new ArrayList<BusinessCustomer>(); List<CustomerRelationship> customerRelationshipList = new ArrayList<CustomerRelationship>(); List<Customer> customerList = new ArrayList<Customer>(); for (CustomerRelationship customerRelationship: customerRelationshipList) { int temp = 0; for (Customer customer:customerList){ if(customer...
