class GeometricDoubleBondEncoderFactory implements StereoEncoderFactory {

    static boolean accept(IAtom atom, List<IBond> bonds) {

        int dbCount = 0;

        // not SP2
        if (!IAtomType.Hybridization.SP2.equals(atom.getHybridization())) return false;

        // only have one neighbour (which is the other atom) -> this is no configurable
        if (bonds.size() == 1) return false;

        for (IBond bond : bonds) {

            // increment the number of double bonds
            if (DOUBLE.equals(bond.getOrder())) dbCount++;

            // up/down bonds sometimes used to indicate E/Z
            IBond.Stereo stereo = bond.getStereo();
            if (IBond.Stereo.UP_OR_DOWN.equals(stereo) || IBond.Stereo.UP_OR_DOWN_INVERTED.equals(stereo))
                return false;

        }

        // not cumulated
        return dbCount == 1;
    }

}