@Override
    public int lastIndexOf(Object o) {
        IAtomContainer atomContainer = (IAtomContainer) o;
        if (!atomContainer.getTitle().equals(title)) return -1;

        if (atomContainer.getAtomCount() != coordinates.get(0).length) return -1;

        boolean coordsMatch;
        for (int j = coordinates.size() - 1; j >= 0; j--) {
            Point3d[] coords = coordinates.get(j);
            coordsMatch = true;
            for (int i = 0; i < atomContainer.getAtomCount(); i++) {
                Point3d p = atomContainer.getAtom(i).getPoint3d();
                if (!(p.x == coords[i].x && p.y == coords[i].y && p.z == coords[i].z)) {
                    coordsMatch = false;
                    break;
                }
            }
            if (coordsMatch) return j;
        }
        return -1;
    }
@ Override public int lastIndexOf ( Object o ) { IAtomContainer atomContainer = ( IAtomContainer ) o ; if ( ! atomContainer . getTitle ( ) . equals ( title ) ) return - 1 ; if ( atomContainer . getAtomCount ( ) != coordinates . get ( 0 ) . length ) return - 1 ; boolean coordsMatch ; for ( int j = coordinates . size ( ) - 1 ; j >= 0 ; j -- ) { Point3d [ ] coords = coordinates . get ( j ) ; coordsMatch = true ; for ( int i = 0 ; i < atomContainer . getAtomCount ( ) ; i ++ ) { Point3d p = atomContainer . getAtom ( i ) . getPoint3d ( ) ; if ( ! ( p . x == coords [ i ] . x && p . y == coords [ i ] . y && p . z == coords [ i ] . z ) ) { coordsMatch = false ; break ; } } if ( coordsMatch ) return j ; } return - 1 ; }
Returns the highest index at which the specific IAtomContainer appears in the list or -1 if is not found.

A given IAtomContainer will occur in the list if the title matches the stored title for
the conformers in this container and if the coordinates for each atom in the specified molecule
are equal to the coordinates of the corresponding atoms in a conformer.

@param o The IAtomContainer whose presence is being tested
@return The index where o was found