@Override public Object clone() { NamedFragment copy = new NamedFragment(this.getName()); copy.setOccurences(this.getOccurences()); copy.resolve(this.resolved); return copy; }
@Override public boolean append(RuleFragment frag) { if (frag instanceof NamedFragment) { NamedFragment nf = (NamedFragment) frag; if (nf.getName().equals(this.getName())) { this.setOccurences(this.getOccurences().add(nf.getOccurences())); return true; } } return false; }