internal virtual void addAtomWithMappedName(Atom atom)
 {
     addAtom(atom);
     mapMostRecentAtomName();
 }
 internal virtual void addAtom(Atom atom)
 {
     if (atomCount == atoms.Length)
         atoms = (Atom[])AtomSetCollectionReader.doubleLength(atoms);
     atoms[atomCount++] = atom;
     if (atomSetCount == 0)
     {
         atomSetCount = 1;
         currentAtomSetIndex = 0;
         atomSetNumbers[0] = 1;
     }
     atom.atomSetIndex = currentAtomSetIndex;
     ++atomSetAtomCounts[currentAtomSetIndex];
     /*
     System.out.println("addAtom ... after" +
     "\natomCount=" + atomCount +
     "\natomSetCount=" + atomSetCount +
     "\natomSetAtomCounts[" + (currentAtomSetIndex) + "]=" +
     atomSetAtomCounts[atomSetIndex]);
     */
 }
 internal virtual Atom newCloneAtom(Atom atom)
 {
     //    System.out.println("newCloneAtom()");
     Atom clone = atom.cloneAtom();
     addAtom(clone);
     return clone;
 }
 internal virtual Atom addNewAtom()
 {
     Atom atom = new Atom();
     addAtom(atom);
     return atom;
 }
 public override bool hasNext()
 {
     if (iatom == atomSetCollection.atomCount)
         return false;
     atom = atomSetCollection.atoms[iatom++];
     return true;
 }