private void addAtom(String newAtomType, IAtom otherConnectingAtom, Order bondOrder, int hydrogenCount) {
        //Create the new atom and bond.
        IAtom newAtom = currentMolecule.getBuilder().newInstance(IAtom.class, newAtomType);
        newAtom.setImplicitHydrogenCount(hydrogenCount);
        IBond newBond = currentMolecule.getBuilder().newInstance(IBond.class, newAtom, otherConnectingAtom, bondOrder);

        //Add the new atom and bond to the molecule.
        currentMolecule.addAtom(newAtom);
        currentMolecule.addBond(newBond);
    }
private void addAtom ( String newAtomType , IAtom otherConnectingAtom , Order bondOrder , int hydrogenCount ) { IAtom newAtom = currentMolecule . getBuilder ( ) . newInstance ( IAtom . class , newAtomType ) ; newAtom . setImplicitHydrogenCount ( hydrogenCount ) ; IBond newBond = currentMolecule . getBuilder ( ) . newInstance ( IBond . class , newAtom , otherConnectingAtom , bondOrder ) ; currentMolecule . addAtom ( newAtom ) ; currentMolecule . addBond ( newBond ) ; }
Adds an atom to the current molecule.

@param newAtomType The atomic symbol for the atom.
@param otherConnectingAtom An atom already in the molecule which
the new one should connect to.
@param bondOrder The order of the bond to use to join the two atoms.
@param hydrogenCount The number of hydrogen atoms connected to this atom.