Class ElementRule

  • All Implemented Interfaces:
    IRule

    public class ElementRule
    extends Object
    implements IRule
    This class validate if the occurrence of the IElements in the IMolecularFormula are into a limits. As default defines all elements of the periodic table with a occurrence of zero to 100.
    Table 1: Parameters set by this rule.
    Name Default Description
    elements C,H,N,O The IELements to be analyzed
    Author:
    miguelrojasch
    Source code:
    main
    Belongs to CDK module:
    formula
    Created on:
    2007-11-20
    • Constructor Detail

      • ElementRule

        public ElementRule()
        Constructor for the ElementRule object.
    • Method Detail

      • validate

        public double validate​(IMolecularFormula formula)
                        throws CDKException
        Validate the occurrence of this IMolecularFormula.
        Specified by:
        validate in interface IRule
        Parameters:
        formula - Parameter is the IMolecularFormula
        Returns:
        An ArrayList containing 9 elements in the order described above
        Throws:
        CDKException - if an error occurs during the validation. See documentation for individual rules