Class ElementRule
java.lang.Object
org.openscience.cdk.formula.rules.ElementRule
- All Implemented Interfaces:
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.
| 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionObject[]Gets the parameters attribute of the ElementRule object.voidsetParameters(Object[] params) Sets the parameters attribute of the ElementRule object.doublevalidate(IMolecularFormula formula) Validate the occurrence of this IMolecularFormula.
-
Constructor Details
-
ElementRule
public ElementRule()Constructor for the ElementRule object.
-
-
Method Details
-
setParameters
Sets the parameters attribute of the ElementRule object.- Specified by:
setParametersin interfaceIRule- Parameters:
params- The new parameters value- Throws:
CDKException- Description of the Exception- See Also:
-
getParameters
Gets the parameters attribute of the ElementRule object.- Specified by:
getParametersin interfaceIRule- Returns:
- The parameters value
- See Also:
-
validate
Validate the occurrence of this IMolecularFormula.- Specified by:
validatein interfaceIRule- 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
-