Class IsotopePatternRule
- java.lang.Object
-
- org.openscience.cdk.formula.rules.IsotopePatternRule
-
- All Implemented Interfaces:
IRule
public class IsotopePatternRule extends Object implements IRule
This class validate if the Isotope Pattern from a given IMolecularFormula correspond with other to compare.Table 1: Parameters set by this rule. Name Default Description isotopePattern List <Double[]>The Isotope Pattern to compare - Author:
- Miguel Rojas Cherto
- Source code:
- main
- Belongs to CDK module:
- formula
- Created on:
- 2007-11-20
-
-
Constructor Summary
Constructors Constructor Description IsotopePatternRule()Constructor for the IsotopePatternRule object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object[]getParameters()Gets the parameters attribute of the IsotopePatternRule object.voidsetParameters(Object[] params)Sets the parameters attribute of the IsotopePatternRule object.doublevalidate(IMolecularFormula formula)Validate the isotope pattern of this IMolecularFormula.
-
-
-
Method Detail
-
setParameters
public void setParameters(Object[] params) throws CDKException
Sets the parameters attribute of the IsotopePatternRule object.- Specified by:
setParametersin interfaceIRule- Parameters:
params- The new parameters value- Throws:
CDKException- Description of the Exception- See Also:
getParameters()
-
getParameters
public Object[] getParameters()
Gets the parameters attribute of the IsotopePatternRule object.- Specified by:
getParametersin interfaceIRule- Returns:
- The parameters value
- See Also:
setParameters(java.lang.Object[])
-
validate
public double validate(IMolecularFormula formula) throws CDKException
Validate the isotope pattern of this IMolecularFormula. Important, first you have to add with thesetParameters(Object[])a IMolecularFormulaSet which represents the isotope pattern to compare.- Specified by:
validatein interfaceIRule- Parameters:
formula- Parameter is the IMolecularFormula- Returns:
- A double value meaning 1.0 True, 0.0 False
- Throws:
CDKException- if an error occurs during the validation. See documentation for individual rules
-
-