@Override
    public IAtom[] getConnectedAtoms(IAtom atom) {
        if (atomCount < 1) return null;
        IAtom[] connected = new IAtom[atomCount-1];
        int j = 0;
        for (int i = 0; i < atomCount; i++) {
            if (!this.atoms[i].equals(atom)) {
                if (j >= connected.length)
                    return null;
                connected[j++] = this.atoms[i];
            }
        }
        return connected;
    }
@ Override public IAtom [ ] getConnectedAtoms ( IAtom atom ) { if ( atomCount < 1 ) return null ; IAtom [ ] connected = new IAtom [ atomCount - 1 ] ; int j = 0 ; for ( int i = 0 ; i < atomCount ; i ++ ) { if ( ! this . atoms [ i ] . equals ( atom ) ) { if ( j >= connected . length ) return null ; connected [ j ++ ] = this . atoms [ i ] ; } } return connected ; }
{@inheritDoc}