@TestClass(value="org.openscience.cdk.formula.MolecularFormulaRangeTest") public class MolecularFormulaRange extends Object implements Cloneable
With this class man can define a MolecularFormula which contains certain IIsotope with a maximum and minimum occurrence. Examples:
[C(1-5)H(4-10)]-
Constructor and Description |
---|
MolecularFormulaRange()
Constructs an empty MolecularFormulaExpand.
|
Modifier and Type | Method and Description |
---|---|
void |
addIsotope(IIsotope isotope,
int countMin,
int countMax)
Adds an Isotope to this MolecularFormulaExpand in a number of
maximum and minimum occurrences allowed.
|
Object |
clone()
Clones this MolecularFormulaExpand object and its content.
|
boolean |
contains(IIsotope isotope)
True, if the MolecularFormulaExpand contains the given IIsotope.
|
int |
getIsotopeCount()
Checks a set of Nodes for the number of different isotopes in the
MolecularFormulaExpand.
|
int |
getIsotopeCountMax(IIsotope isotope)
Checks a set of Nodes for the maximal occurrence of the isotope in the
MolecularFormulaExpand from a particular isotope.
|
int |
getIsotopeCountMin(IIsotope isotope)
Checks a set of Nodes for the minimal occurrence of the isotope in the
MolecularFormulaExpand from a particular isotope.
|
Iterable<IIsotope> |
isotopes()
Returns an Iterator for looping over all isotopes in this MolecularFormulaExpand.
|
void |
removeAllIsotopes()
Removes all isotopes of this molecular formula.
|
void |
removeIsotope(IIsotope isotope)
Removes the given isotope from the MolecularFormulaExpand.
|
public MolecularFormulaRange()
@TestMethod(value="testAddIsotope_IIsotope_int_int") public void addIsotope(IIsotope isotope, int countMin, int countMax)
isotope
- The isotope to be added to this MolecularFormulaExpandcountMax
- The maximal number of occurrences to addcountMin
- The minimal number of occurrences to add@TestMethod(value="testContains_IIsotope") public boolean contains(IIsotope isotope)
isotope
- The IIsotope this MolecularFormula is searched for@TestMethod(value="testGetIsotopeCountMax_IIsotope") public int getIsotopeCountMax(IIsotope isotope)
isotope
- The IIsotope to look for@TestMethod(value="testGetIsotopeCountMin_IIsotope") public int getIsotopeCountMin(IIsotope isotope)
isotope
- The IIsotope to look for@TestMethod(value="testGetIsotopeCount") public int getIsotopeCount()
@TestMethod(value="testIsotopes") public Iterable<IIsotope> isotopes()
@TestMethod(value="testRemoveAllIsotopes") public void removeAllIsotopes()
@TestMethod(value="testRemoveIsotope_IIsotope") public void removeIsotope(IIsotope isotope)
isotope
- The IIsotope to be removed@TestMethod(value="testClone") public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException