code: @Override
      public void add(IAtomContainer that) {
  
          atoms = Arrays.copyOf(atoms, atomCount + that.getAtomCount());
          bonds = Arrays.copyOf(bonds, bondCount + that.getBondCount());
  
          for (IAtom atom : that.atoms())
              atom.setFlag(CDKConstants.VISITED, false);
          for (IBond bond : that.bonds())
              bond.setFlag(CDKConstants.VISITED, false);
          for (IAtom atom : this.atoms())
              atom.setFlag(CDKConstants.VISITED, true);
          for (IBond bond : this.bonds())
              bond.setFlag(CDKConstants.VISITED, true);
  
          for (IAtom atom : that.atoms()) {
              if (!atom.getFlag(CDKConstants.VISITED)) {
                  atom.setFlag(CDKConstants.VISITED, true);
                  atoms[atomCount++] = atom;
              }
          }
          for (IBond bond : that.bonds()) {
              if (!bond.getFlag(CDKConstants.VISITED)) {
                  bond.setFlag(CDKConstants.VISITED, true);
                  bonds[bondCount++] = bond;
              }
          }
          for (ILonePair lp : that.lonePairs()) {
              if (!contains(lp)) {
                  addLonePair(lp);
              }
          }
          for (ISingleElectron se : that.singleElectrons()) {
              if (!contains(se)) {
                  addSingleElectron(se);
              }
          }
          for (IStereoElement se : that.stereoElements())
              stereoElements.add(se);
      }
docs: {@inheritDoc}