class GeometricCumulativeDoubleBondFactory implements StereoEncoderFactory {

    static StereoEncoder axialEncoder(IAtomContainer container, IAtom start, IAtom end) {

        List<IBond> startBonds = container.getConnectedBondsList(start);
        List<IBond> endBonds = container.getConnectedBondsList(end);

        if (startBonds.size() < 2 || endBonds.size() < 2) return null;

        if (has2DCoordinates(startBonds) && has2DCoordinates(endBonds)) {
            return axial2DEncoder(container, start, startBonds, end, endBonds);
        } else if (has3DCoordinates(startBonds) && has3DCoordinates(endBonds)) {
            return axial3DEncoder(container, start, startBonds, end, endBonds);
        }

        return null;
    }

}