Interface IRule

    • Method Detail

      • setParameters

        void setParameters​(Object[] params)
                    throws CDKException
        Sets the parameters for this rule. Must be done before calling calculate as the parameters influence the validation outcome.
        Parameters:
        params - An array of Object containing the parameters for this rule
        Throws:
        CDKException - if invalid number of type of parameters are passed to it
        See Also:
        getParameters()
      • validate

        double validate​(IMolecularFormula formula)
                 throws CDKException
        Analyze the validity for the given IMolecularFormula.
        Parameters:
        formula - An IMolecularFormula for which this rule should be analyzed
        Returns:
        A double value between 0 and 1. 1 meaning 100% valid and 0 not valid
        Throws:
        CDKException - if an error occurs during the validation. See documentation for individual rules