@Test public void testAddBond() { frag.addAtom(new Atom(1, ChemEl.C, frag)); frag.addAtom(new Atom(2, ChemEl.C, frag)); assertEquals("Has no bonds", 0, frag.getBondSet().size()); fm.createBond(frag.getAtomByID(1), frag.getAtomByID(2), 1); assertEquals("Now has one bond", 1, frag.getBondSet().size()); }
void addBond(Bond bond) { bondSet.add(bond); }
Fragment implements Iterable<Atom> { void addBond(Bond bond) { bondSet.add(bond); } }
Fragment implements Iterable<Atom> { void addBond(Bond bond) { bondSet.add(bond); } Fragment(Element tokenEl);   Fragment(String type); }
Fragment implements Iterable<Atom> { void addBond(Bond bond) { bondSet.add(bond); } Fragment(Element tokenEl);   Fragment(String type); @Override Iterator<Atom> iterator(); }
Fragment implements Iterable<Atom> { void addBond(Bond bond) { bondSet.add(bond); } Fragment(Element tokenEl);   Fragment(String type); @Override Iterator<Atom> iterator();  }