comparing list of objects in java 8 : This post may be duplicate one, apologies for that.

 I have worked extensively in Java-6, now moving to java 8. Is their efficient way to rewrite the below logic in Java 8.

Comparing list of object with single object if "Identifier" parameter value is matching, return "true" else "false"


    private boolean compareOrder(UserOrderDTO.OrderConfig givenDeviceConfig, List<UserOrderDTO.OrderConfig> masterConfigList) {
		boolean isValidService = false;
		
		for(UserOrderDTO.OrderConfig eachRecord:masterConfigList) {
			if(eachRecord.getIdentifier()!=null && givenDeviceConfig.getIdentifier()!=null) {
				
				if(eachRecord.getIdentifier().trim().equalsIgnoreCase(givenDeviceConfig.getIdentifier().trim()) ) {
					isValidService = true;
					break;
				}
				
			}
		}
		return isValidService;
	}

Also if I want to compare two list, any suggestions please

      
     List<UserOrderDTO.OrderConfig> oneList = some value;
     List<UserOrderDTO.OrderConfig> twoList = some value;