Skip to content

Commit

Permalink
Use interfaces instead of implementations: IPseudoAtom
Browse files Browse the repository at this point in the history
  • Loading branch information
egonw committed Aug 23, 2015
1 parent 66f8f71 commit cd91c50
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 2003-2007 Egon Willighagen <egonw@users.sf.net>
/* Copyright (C) 2003-2015 Egon Willighagen <egonw@users.sf.net>
*
* Contact: cdk-devel@lists.sourceforge.net
*
Expand All @@ -22,6 +22,9 @@
*/
package org.openscience.cdk;

import org.openscience.cdk.interfaces.IAtom;
import org.openscience.cdk.interfaces.IPseudoAtom;

/**
* Atom that represents part of an residue in an enzyme, like Arg255.
*
Expand Down Expand Up @@ -55,10 +58,10 @@ public EnzymeResidueLocator(String label) {
*
* @param atom Atom that should be converted into a EnzymeResidueLocator.
*/
public EnzymeResidueLocator(Atom atom) {
public EnzymeResidueLocator(IAtom atom) {
super(atom);
if (atom instanceof PseudoAtom) {
this.setLabel(((PseudoAtom) atom).getLabel());
if (atom instanceof IPseudoAtom) {
this.setLabel(((IPseudoAtom) atom).getLabel());
}
}
}

0 comments on commit cd91c50

Please sign in to comment.