code: protected void addToAtomContainer(IAtomContainer ac, IChemObject item) {
          if (item instanceof IAtomContainer) {
              ac.add((IAtomContainer) item);
          } else if (item instanceof IAtom) {
              ac.addAtom((IAtom) item);
          } else if (item instanceof IBond) {
              ac.addBond((IBond) item);
          }
      }
docs: Utility method to add an {@link IChemObject} to an {@link IAtomContainer}.
  
  @param ac the {@link IAtomContainer} to add to
  @param item the {@link IChemObject} to add