public List<StorageUnitEntity> excludePartitions(List<StorageUnitEntity> storageUnitEntities,List<List<String>> excludedPartitions){
  List<StorageUnitEntity> result=new ArrayList<>();
  for (  StorageUnitEntity storageUnitEntity : storageUnitEntities) {
    if (!excludedPartitions.contains(businessObjectDataHelper.getPrimaryAndSubPartitionValues(storageUnitEntity.getBusinessObjectData()))) {
      result.add(storageUnitEntity);
    }
  }
  return result;
}

public List < StorageUnitEntity > excludePartitions ( List < StorageUnitEntity > storageUnitEntities , List < List < String > > excludedPartitions ) { List < StorageUnitEntity > result = new ArrayList < > ( ) ; for ( StorageUnitEntity storageUnitEntity : storageUnitEntities ) { if ( ! excludedPartitions . contains ( businessObjectDataHelper . getPrimaryAndSubPartitionValues ( storageUnitEntity . getBusinessObjectData ( ) ) ) ) { result . add ( storageUnitEntity ) ; } } return result ; }
excludes storage units from the list with primary and sub - partition values matching one of the excluded partitions .
