Collection result = new HashSet(); Iterator iter = c.iterator(); while (iter.hasNext()) { DefenseCondition dc = (DefenseCondition)iter.next(); if ((dc instanceof DefenseApplicabilityCondition) && (dc.getDefenseName().equals(defenseName))) { result.add(dc); } } return result;
return null;
    public static Collection findDefenseCollection(String defenseName, Collection c) {        Collection result = new HashSet();        Iterator iter = c.iterator();        while (iter.hasNext()) {           DefenseCondition dc = (DefenseCondition)iter.next();           if ((dc instanceof DefenseApplicabilityCondition) && (dc.getDefenseName().equals(defenseName))) {               result.add(dc);           }        }        return result;    }    