/** * {@inheritDoc} */ @Override public Iterable<IBond> bonds() { logger.debug("Getting bonds iterator"); return super.bonds(); }
for (IBond bond : bonds()) { for (int i = 0; i < bond.getAtomCount(); i++) { if (oldAtom.equals(bond.getAtom(i))) {
for (IBond bond : bonds()) { for (int i = 0; i < bond.getAtomCount(); i++) { if (oldAtom.equals(bond.getAtom(i))) {
/** * {@inheritDoc} */ @Override public Order getMaximumBondOrder(IAtom atom) { IBond.Order max = null; for (IBond bond : bonds()) { if (!bond.contains(atom)) continue; if (max == null || bond.getOrder().numeric() > max.numeric()) { max = bond.getOrder(); } } if (max == null) { if (!contains(atom)) throw new NoSuchAtomException("Atom does not belong to this container!"); if (atom.getImplicitHydrogenCount() != null && atom.getImplicitHydrogenCount() > 0) max = Order.SINGLE; else max = Order.UNSET; } return max; }
/** * {@inheritDoc} */ @Override public Order getMaximumBondOrder(IAtom atom) { IBond.Order max = null; for (IBond bond : bonds()) { if (!bond.contains(atom)) continue; if (max == null || bond.getOrder().numeric() > max.numeric()) { max = bond.getOrder(); } } if (max == null) { if (!contains(atom)) throw new NoSuchAtomException("Atom does not belong to this container!"); if (atom.getImplicitHydrogenCount() != null && atom.getImplicitHydrogenCount() > 0) max = Order.SINGLE; else max = Order.UNSET; } return max; }
/** * {@inheritDoc} */ @Override public Order getMinimumBondOrder(IAtom atom) { IBond.Order min = null; for (IBond bond : bonds()) { if (!bond.contains(atom)) continue; if (min == null || bond.getOrder().numeric() < min.numeric()) { min = bond.getOrder(); } } if (min == null) { if (!contains(atom)) throw new NoSuchAtomException("Atom does not belong to this container!"); if (atom.getImplicitHydrogenCount() != null && atom.getImplicitHydrogenCount() > 0) min = Order.SINGLE; else min = Order.UNSET; } return min; }
/** * {@inheritDoc} */ @Override public Order getMinimumBondOrder(IAtom atom) { IBond.Order min = null; for (IBond bond : bonds()) { if (!bond.contains(atom)) continue; if (min == null || bond.getOrder().numeric() < min.numeric()) { min = bond.getOrder(); } } if (min == null) { if (!contains(atom)) throw new NoSuchAtomException("Atom does not belong to this container!"); if (atom.getImplicitHydrogenCount() != null && atom.getImplicitHydrogenCount() > 0) min = Order.SINGLE; else min = Order.UNSET; } return min; }
for (IAtom atom : this.atoms()) atom.setFlag(CDKConstants.VISITED, true); for (IBond bond : this.bonds()) bond.setFlag(CDKConstants.VISITED, true);
for (IAtom atom : this.atoms()) atom.setFlag(CDKConstants.VISITED, true); for (IBond bond : this.bonds()) bond.setFlag(CDKConstants.VISITED, true);