Class ToleranceRangeRule
java.lang.Object
org.openscience.cdk.formula.rules.ToleranceRangeRule
- All Implemented Interfaces:
IRule
This class validate if the mass from an IMolecularFormula is
between the tolerance range give a experimental mass. As default
the mass to range is 0.0.
Name | Default | Description |
mass | 0.0 | The Mass which the MolecularFormula has to be compared |
tolerance | 0.05 | The range tolerance |
- Author:
- miguelrojasch
- Source code:
- main
- Belongs to CDK module:
- formula
- Created on:
- 2007-11-20
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionObject[]
Gets the parameters attribute of the ToleranceRangeRule object.void
setParameters
(Object[] params) Sets the parameters attribute of the ToleranceRangeRule object.double
validate
(IMolecularFormula formula) Validate the Tolerance Range of this IMolecularFormula.
-
Constructor Details
-
ToleranceRangeRule
public ToleranceRangeRule()Constructor for the ToleranceRangeRule object.
-
-
Method Details
-
setParameters
Sets the parameters attribute of the ToleranceRangeRule object.- Specified by:
setParameters
in interfaceIRule
- Parameters:
params
- The new parameters value- Throws:
CDKException
- Description of the Exception- See Also:
-
getParameters
Gets the parameters attribute of the ToleranceRangeRule object.- Specified by:
getParameters
in interfaceIRule
- Returns:
- The parameters value
- See Also:
-
validate
Validate the Tolerance Range of this IMolecularFormula.- Specified by:
validate
in 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
-