/** * {@inheritDoc} */ @Override public IBond getBond(IAtom beg, IAtom end) { final AtomRef begref = getAtomRefUnsafe(beg); return begref != null ? begref.getBond(end) : null; }
private BaseAtomRef getAtomRef(IAtom atom) { BaseAtomRef atomref = getAtomRefUnsafe(atom); if (atomref == null) throw new NoSuchAtomException("Atom is not a member of this AtomContainer"); return atomref; }
/** * {@inheritDoc} */ @Override public int indexOf(IAtom atom) { final AtomRef aref = getAtomRefUnsafe(atom); return aref == null ? -1 : aref.getIndex(); }
/** * {@inheritDoc} */ @Override public IBond getBond(IAtom beg, IAtom end) { final AtomRef begref = getAtomRefUnsafe(beg); return begref != null ? begref.getBond(end) : null; }
private BaseAtomRef getAtomRef(IAtom atom) { BaseAtomRef atomref = getAtomRefUnsafe(atom); if (atomref == null) throw new NoSuchAtomException("Atom is not a member of this AtomContainer"); return atomref; }
/** * {@inheritDoc} */ @Override public int indexOf(IAtom atom) { final AtomRef aref = getAtomRefUnsafe(atom); return aref == null ? -1 : aref.getIndex(); }
private void delFromEndpoints(BondRef bondref) { for (int i = 0; i < bondref.getAtomCount(); i++) { BaseAtomRef aref = getAtomRefUnsafe(bondref.getAtom(i)); // atom may have already been deleted, naughty! if (aref != null) aref.bonds.remove(bondref); } }
private void delFromEndpoints(BondRef bondref) { for (int i = 0; i < bondref.getAtomCount(); i++) { BaseAtomRef aref = getAtomRefUnsafe(bondref.getAtom(i)); // atom may have already been deleted, naughty! if (aref != null) aref.bonds.remove(bondref); } }
AtomRef atomref = getAtomRefUnsafe(atom); if (atomref != null) { if (atomref.getBondCount() > 0) {
AtomRef atomref = getAtomRefUnsafe(atom); if (atomref != null) { if (atomref.getBondCount() > 0) {