public static void addFeatures(FeatureContainer fc, FreeColObject fco) {
        FeatureContainer c = fco.getFeatureContainer();
        if (fc != null && c != null) {
            for (Entry<String, Set<Ability>> entry : c.abilities.entrySet()) {
                Set<Ability> abilitySet = fc.abilities.get(entry.getKey());
                if (abilitySet == null) {
                    fc.abilities.put(entry.getKey(),
                                     new HashSet<Ability>(entry.getValue()));
                } else {
                    abilitySet.addAll(entry.getValue());
                }
            }
            for (Entry<String, Set<Modifier>> entry : c.modifiers.entrySet()) {
                Set<Modifier> modifierSet = fc.modifiers.get(entry.getKey());
                if (modifierSet == null) {
                    fc.modifiers.put(entry.getKey(),
                                     new HashSet<Modifier>(entry.getValue()));
                } else {
                    modifierSet.addAll(entry.getValue());
                }
            }
        }
    }