code: public static IElectronContainer[] getElectronContainerArray(IAtomContainer container) {
          IElectronContainer[] ret = new IElectronContainer[container.getElectronContainerCount()];
          for (int i = 0; i < ret.length; ++i)
              ret[i] = container.getElectronContainer(i);
          return ret;
      }
docs: Constructs an array of Bond objects from an AtomContainer.
  @param  container The original AtomContainer.
  @return The array of Bond objects.