AtomContainer extends ChemObject implements IAtomContainer, IChemObjectListener, Serializable, Cloneable { public AtomContainer() { this(0, 0, 0, 0); } AtomContainer();  AtomContainer(IAtomContainer container);  AtomContainer(int atomCount, int bondCount, int lpCount,
                         int seCount); @Override void addStereoElement(IStereoElement element); @Override void setStereoElements(List<IStereoElement> elements); @Override Iterable<IStereoElement> stereoElements(); @Override void setAtoms(IAtom[] newAtoms); @Override void setBonds(IBond[] newBonds); @Override void setAtom(int idx, IAtom atom); @Override IAtom getAtom(int idx); @Override IBond getBond(int idx); @Override ILonePair getLonePair(int idx); @Override ISingleElectron getSingleElectron(int idx); @Override Iterable<IAtom> atoms(); @Override Iterable<IBond> bonds(); @Override Iterable<ILonePair> lonePairs(); @Override Iterable<ISingleElectron> singleElectrons(); @Override Iterable<IElectronContainer> electronContainers(); @Override IAtom getFirstAtom(); @Override IAtom getLastAtom(); @Override int getAtomNumber(IAtom atom); @Override int getBondNumber(IAtom atom1, IAtom atom2); @Override int getBondNumber(IBond bond); @Override int getLonePairNumber(ILonePair lonePair); @Override int getSingleElectronNumber(ISingleElectron singleElectron); @Override int indexOf(IAtom atom); @Override int indexOf(IBond bond); @Override int indexOf(ISingleElectron electron); @Override int indexOf(ILonePair pair); @Override IElectronContainer getElectronContainer(int number); @Override IBond getBond(IAtom atom1, IAtom atom2); @Override int getAtomCount(); @Override int getBondCount(); @Override int getLonePairCount(); @Override int getSingleElectronCount(); @Override int getElectronContainerCount(); @Override List<IAtom> getConnectedAtomsList(IAtom atom); @Override List<IBond> getConnectedBondsList(IAtom atom); @Override List<ILonePair> getConnectedLonePairsList(IAtom atom); @Override List<ISingleElectron> getConnectedSingleElectronsList(IAtom atom); @Override List<IElectronContainer> getConnectedElectronContainersList(
        IAtom atom); @Override int getConnectedBondsCount(IAtom atom); @Override int getConnectedAtomsCount(IAtom atom); @Override int getConnectedBondsCount(int idx); @Override int getConnectedLonePairsCount(IAtom atom); @Override int getConnectedSingleElectronsCount(IAtom atom); @Override double getBondOrderSum(IAtom atom); @Override Order getMaximumBondOrder(IAtom atom); @Override Order getMinimumBondOrder(IAtom atom); @Override void add(IAtomContainer that); @Override void addAtom(IAtom atom); @Override void addBond(IBond bond); @Override void addLonePair(ILonePair lonePair); @Override void addSingleElectron(ISingleElectron singleElectron); @Override void addElectronContainer(IElectronContainer electronContainer); @Override void remove(IAtomContainer atomContainer); @Override void removeAtomOnly(int position); @Override void removeAtomOnly(IAtom atom); @Override IBond removeBond(int position); @Override IBond removeBond(IAtom atom1, IAtom atom2); @Override void removeBond(IBond bond); @Override ILonePair removeLonePair(int position); @Override void removeLonePair(ILonePair lonePair); @Override ISingleElectron removeSingleElectron(int position); @Override void removeSingleElectron(ISingleElectron singleElectron); @Override IElectronContainer removeElectronContainer(int number); @Override void removeElectronContainer(IElectronContainer electronContainer); @Override @Deprecated void removeAtomAndConnectedElectronContainers(IAtom atom); @Override void removeAtom(IAtom atom); @Override void removeAtom(int pos); @Override void removeAllElements(); @Override void removeAllElectronContainers(); @Override void removeAllBonds(); @Override void addBond(int atom1, int atom2, IBond.Order order,
                        IBond.Stereo stereo); @Override void addBond(int atom1, int atom2, IBond.Order order); @Override void addLonePair(int atomID); @Override void addSingleElectron(int atomID); @Override boolean contains(IAtom atom); @Override boolean contains(IBond bond); @Override boolean contains(ILonePair lonePair); @Override boolean contains(ISingleElectron singleElectron); @Override boolean contains(IElectronContainer electronContainer); @Override String toString(); @Override IAtomContainer clone(); @Override void stateChanged(IChemObjectChangeEvent event); @Override boolean isEmpty(); @Override String getTitle(); @Override void setTitle(String title);  }
@Test public void testAtomContainer() { IAtomContainer container = new AtomContainer(); Assert.assertEquals(0, container.getAtomCount()); Assert.assertEquals(0, container.getBondCount()); container.addBond(container.getBuilder().newInstance(IBond.class, container.getBuilder().newInstance(IAtom.class, "C"), container.getBuilder().newInstance(IAtom.class, "C"), IBond.Order.DOUBLE)); container.addLonePair(container.getBuilder().newInstance(ILonePair.class, container.getBuilder().newInstance(IAtom.class, "N"))); }