public Set<Party> getParentParties(AccountabilityTypeEnum accountabilityTypeEnum, Class parentPartyClass) { final Set<Party> result = new HashSet<Party>(); for (final Accountability accountability : getParentsSet()) { if (accountability.getAccountabilityType().getType() == accountabilityTypeEnum && accountability.getParentParty().getClass().equals(parentPartyClass)) { result.add(accountability.getParentParty()); } } return result;
public List<Party> getParentParties(AccountabilityTypeEnum accountabilityTypeEnum, Class parentPartyClass) { final List<Party> result = new ArrayList<Party>(); for (final Accountability accountability : getParentsSet()) { if (accountability.getAccountabilityType().getType() == accountabilityTypeEnum && accountability.getParentParty().getClass().equals(parentPartyClass)) { result.add(accountability.getParentParty()); } } return result;
    public Set<Party> getParentParties(AccountabilityTypeEnum accountabilityTypeEnum, Class parentPartyClass) {        final Set<Party> result = new HashSet<Party>();        for (final Accountability accountability : getParentsSet()) {            if (accountability.getAccountabilityType().getType() == accountabilityTypeEnum                    && accountability.getParentParty().getClass().equals(parentPartyClass)) {                result.add(accountability.getParentParty());            }        }        return result;    }