package com.novoda.downloadmanager;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

final class StorageRequirementRules implements StorageRequirementRule {

    private List<StorageRequirementRule> storageRequirementRules;

    static StorageRequirementRules newInstance() {
        return new StorageRequirementRules(new ArrayList<>());
    }

    private StorageRequirementRules(List<StorageRequirementRule> storageRequirementRules) {
        this.storageRequirementRules = storageRequirementRules;
    }

    void addRule(StorageRequirementRule storageRequirementRule) {
        storageRequirementRules.add(storageRequirementRule);
    }

    @Override
    public boolean hasViolatedRule(File storageDirectory, FileSize downloadFileSize) {
        for (StorageRequirementRule requirementRule : storageRequirementRules) {
            if (requirementRule.hasViolatedRule(storageDirectory, downloadFileSize)) {
                return true;
            }
        }

        return false;
    }
}

@@ -217,35 +217,17 @@
 ntRule%3E 
-storageRequirementR
+r
 ules;%0A%0A 
@@ -411,35 +411,17 @@
 ntRule%3E 
-storageRequirementR
+r
 ules) %7B%0A
@@ -437,53 +437,17 @@
 his.
-storageRequirementRules = storageRequirementR
+rules = r
 ules
@@ -529,35 +529,17 @@
         
-storageRequirementR
+r
 ules.add
@@ -726,35 +726,17 @@
 tRule : 
-storageRequirementR
+r
 ules) %7B%0A

Rename confusing field.