code: public IAtom getOtherBondAtom(IAtom atom, IBond bond) {
          if (!bond.contains(atom)) return null;
          if (bond.getBegin().equals(atom))
              return bond.getEnd();
          else
              return bond.getBegin();
      }
docs: Returns the other atom of the bond.
  Expects bond to have only two atoms.
  Returns null if the given atom is not part of the given bond.
  
  @param atom the atom we already have
  @param bond the bond
  @return the other atom of the bond