Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixes Issue #348
  • Loading branch information
johnmay committed Aug 22, 2017
1 parent 5851070 commit b4e065a
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 0 deletions.
Expand Up @@ -513,6 +513,11 @@ public void removeAtom(

}

@Override
public void removeAtom(int pos) {

}

@Override
@Deprecated
public void removeAtomAndConnectedElectronContainers(IAtom atom) {
Expand Down
Expand Up @@ -1105,6 +1105,14 @@ public void removeAtom(IAtom atom) {
notifyChanged();
}

/**
* {@inheritDoc}
*/
@Override
public void removeAtom(int pos) {
removeAtom(getAtom(pos));
}

/**
* {@inheritDoc}
*/
Expand Down
Expand Up @@ -630,6 +630,23 @@ public interface IAtomContainer extends IChemObject, IChemObjectListener {
*/
void removeAtom(IAtom atom);

/**
* Safely remove an atom from the container.
* <br>
* Removes a single atom from the container updating all internal
* state to be consistent. All bonds connected to the atom will be
* deleted as well as all stereo elements. If multiple atoms/bonds are
* being deleted they should be gathered into a single transaction
* and removed with {@link #remove(IAtomContainer)}.
* <br>
* If you are removing hydrogens one of the
* utility methods (e.g. AtomContainerManipulator.removeHydrogens(IAtomContainer))
* is preferable.
*
* @param pos the position of the atom to be removed
*/
void removeAtom(int pos);

/**
* Safely remove an atom from the container.
* @see #removeAtom(IAtom)
Expand Down
Expand Up @@ -1298,6 +1298,14 @@ public void removeAtom(IAtom atom) {
notifyChanged();
}

/**
* {@inheritDoc}
*/
@Override
public void removeAtom(int pos) {
removeAtom(getAtom(pos));
}

/**
* Removes all atoms and bond from this container.
*/
Expand Down
Expand Up @@ -1071,6 +1071,14 @@ public void removeAtom(IAtom atom) {
}
}

/**
* {@inheritDoc}
*/
@Override
public void removeAtom(int pos) {
removeAtom(getAtom(pos));
}

/**
* {@inheritDoc}
*/
Expand Down

0 comments on commit b4e065a

Please sign in to comment.