@Override public NdcPropertiesListModel getModelInCommon(NdcPropertiesListModel model, boolean analysisMode) throws Exception { if (model == null) { return null; } boolean found = false; NdcPropertiesListModel common = new NdcPropertiesListModel(); if (model.getList() != null && list != null) { // Find common ingredient strength values for (final NdcPropertiesModel in : model.getList()) { for (final NdcPropertiesModel in2 : list) { final NdcPropertiesModel commonProperties = in.getModelInCommon(in2, analysisMode); if (commonProperties != null && !common.getList().contains(commonProperties)) { common.getList().add(commonProperties); } found = true; } } } if (!found) { return null; } return common; }
final NdcPropertiesListModel model = new NdcPropertiesListModel(); return new NdcPropertiesListModel();