public boolean removeAll(Collection<?> c) {
if (contains(c)) {
for (Object o : c) {
boolean removed = false;
for (int i = 0; i < rules.length && !removed; i++) {
Rule semionRule = rules[i];
if (semionRule.equals(o)) {
Rule[] semionRulesCopy = new Rule[rules.length - 1];
System.arraycopy(rules, 0, semionRulesCopy, 0, i);
System.arraycopy(rules, i + 1, semionRulesCopy, 0, semionRulesCopy.length - i);
rules = semionRulesCopy;
removed = true;