Package org.openscience.cdk.interfaces
Interface IMolecularFormulaSet
- All Superinterfaces:
Cloneable
,ICDKObject
- All Known Subinterfaces:
IAdductFormula
- All Known Implementing Classes:
AdductFormula
,AdductFormula
,DebugAdductFormula
,DebugMolecularFormulaSet
,MolecularFormulaSet
,MolecularFormulaSet
Class defining a molecular formula object. It maintains
a list of list IMoleculaFormula.
Examples:
[C5H5]-
C6H6
12C513CH6
- Author:
- miguelrojasch
- Source code:
- main
- Belongs to CDK module:
- interfaces
- Keywords:
- molecular formula
- Created on:
- 2007-11-20
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(IMolecularFormulaSet formulaSet) Adds all molecularFormulas in the MolecularFormulaSet to this chemObject.void
addMolecularFormula
(IMolecularFormula formula) Adds an IMolecularFormula to this chemObject.clone()
Clones this IMolecularFormulaSet object and its content.boolean
contains
(IMolecularFormula formula) True, if the IMolecularFormulaSet contains the given IMolecularFormula object.getMolecularFormula
(int position) Returns the IMolecularFormula at positionnumber
in the chemObject.Returns the array of IMolecularFormula of this chemObject.void
Removes all IMolecularFormula of this IMolecularFormulaSet.void
removeMolecularFormula
(int position) Removes the IMolecularFormula at the given position from the IMolecularFormulaSet.void
removeMolecularFormula
(IMolecularFormula formula) Removes the given IMolecularFormula from the IMolecularFormulaSet.int
size()
Returns the number of MolecularFormulas in this IMolecularFormulaSet.Methods inherited from interface org.openscience.cdk.interfaces.ICDKObject
getBuilder
-
Method Details
-
add
Adds all molecularFormulas in the MolecularFormulaSet to this chemObject.- Parameters:
formulaSet
- The MolecularFormulaSet
-
addMolecularFormula
Adds an IMolecularFormula to this chemObject.- Parameters:
formula
- The IMolecularFormula to be added to this chemObject
-
getMolecularFormula
Returns the IMolecularFormula at positionnumber
in the chemObject.- Parameters:
position
- The position of the MolecularFormula to be returned.- Returns:
- The IMolecularFormula at position
number
.
-
molecularFormulas
Iterable<IMolecularFormula> molecularFormulas()Returns the array of IMolecularFormula of this chemObject.- Returns:
- The array of IMolecularFormulas of this chemObject
- See Also:
-
size
int size()Returns the number of MolecularFormulas in this IMolecularFormulaSet.- Returns:
- The number of MolecularFormulas in this IMolecularFormulaSet
-
contains
True, if the IMolecularFormulaSet contains the given IMolecularFormula object.- Parameters:
formula
- The IMolecularFormula this IMolecularFormulaSet is searched for- Returns:
- True, if the IMolecularFormulaSet contains the given formula object
-
removeMolecularFormula
Removes the given IMolecularFormula from the IMolecularFormulaSet.- Parameters:
formula
- The IMolecularFormula to be removed
-
removeMolecularFormula
void removeMolecularFormula(int position) Removes the IMolecularFormula at the given position from the IMolecularFormulaSet.- Parameters:
position
- The position of the IMolecularFormula to be removed.
-
removeAllMolecularFormulas
void removeAllMolecularFormulas()Removes all IMolecularFormula of this IMolecularFormulaSet. -
clone
Clones this IMolecularFormulaSet object and its content.- Returns:
- The cloned object
- Throws:
CloneNotSupportedException
-