@TestClass(value="org.openscience.cdk.formula.MolecularFormulaTest") public class MolecularFormula extends Object implements IMolecularFormula
IIsotope.
Examples:
[C5H5]-C6H612C513CH6| Constructor and Description |
|---|
MolecularFormula()
Constructs an empty MolecularFormula.
|
| Modifier and Type | Method and Description |
|---|---|
IMolecularFormula |
add(IMolecularFormula formula)
Adds an molecularFormula to this MolecularFormula.
|
IMolecularFormula |
addIsotope(IIsotope isotope)
Adds an Isotope to this MolecularFormula one time.
|
IMolecularFormula |
addIsotope(IIsotope isotope,
int count)
Adds an Isotope to this MolecularFormula in a number of occurrences.
|
Object |
clone()
Clones this MolecularFormula object and its content.
|
boolean |
contains(IIsotope isotope)
True, if the MolecularFormula contains the given IIsotope object and not
the instance.
|
IChemObjectBuilder |
getBuilder()
Returns a
IChemObjectBuilder for the data classes that extend
this class. |
Integer |
getCharge()
Returns the partial charge of this IMolecularFormula.
|
int |
getIsotopeCount()
Checks a set of Nodes for the number of different isotopes in the
IMolecularFormula.
|
int |
getIsotopeCount(IIsotope isotope)
Checks a set of Nodes for the occurrence of the isotope in the
IMolecularFormula from a particular isotope.
|
Map<Object,Object> |
getProperties()
Returns a Map with the IChemObject's properties.I should
integrate into ChemObject.
|
Object |
getProperty(Object description)
Returns a property for the IChemObject.
|
Iterable<IIsotope> |
isotopes()
Returns an Iterator for looping over all isotopes in this IMolecularFormula.
|
void |
removeAllIsotopes()
Removes all isotopes of this molecular formula.
|
void |
removeIsotope(IIsotope isotope)
Removes the given isotope from the MolecularFormula.
|
void |
removeProperty(Object description)
Removes a property for a IChemObject.
|
void |
setCharge(Integer charge)
Sets the partial charge of this IMolecularFormula.
|
void |
setProperties(Map<Object,Object> properties)
Sets the properties of this object.
|
void |
setProperty(Object description,
Object property)
Sets a property for a IChemObject.
|
@TestMethod(value="testAdd_IMolecularFormula") public IMolecularFormula add(IMolecularFormula formula)
add in interface IMolecularFormulaformula - The molecularFormula to be added to this chemObject@TestMethod(value="addIsotope_IIsotope") public IMolecularFormula addIsotope(IIsotope isotope)
addIsotope in interface IMolecularFormulaisotope - The isotope to be added to this MolecularFormulaaddIsotope(IIsotope, int)@TestMethod(value="testAddIsotope_IIsotope_int") public IMolecularFormula addIsotope(IIsotope isotope, int count)
addIsotope in interface IMolecularFormulaisotope - The isotope to be added to this MolecularFormulacount - The number of occurrences to addaddIsotope(IIsotope)@TestMethod(value="testContains_IIsotope") public boolean contains(IIsotope isotope)
contains in interface IMolecularFormulaisotope - The IIsotope this MolecularFormula is searched for@TestMethod(value="testGetCharge") public Integer getCharge()
getCharge in interface IMolecularFormulasetCharge(java.lang.Integer)@TestMethod(value="testGetIsotopeCount_IIsotope") public int getIsotopeCount(IIsotope isotope)
getIsotopeCount in interface IMolecularFormulaisotope - The IIsotope to look forgetIsotopeCount()@TestMethod(value="testGetIsotopeCount") public int getIsotopeCount()
getIsotopeCount in interface IMolecularFormulagetIsotopeCount(IIsotope)@TestMethod(value="testIsotopes") public Iterable<IIsotope> isotopes()
isotopes in interface IMolecularFormula@TestMethod(value="testSetCharge_Integer") public void setCharge(Integer charge)
setCharge in interface IMolecularFormulacharge - The partial chargegetCharge()@TestMethod(value="testRemoveAllIsotopes") public void removeAllIsotopes()
removeAllIsotopes in interface IMolecularFormula@TestMethod(value="testRemoveIsotope_IIsotope") public void removeIsotope(IIsotope isotope)
removeIsotope in interface IMolecularFormulaisotope - The IIsotope to be removed@TestMethod(value="testClone") public Object clone() throws CloneNotSupportedException
clone in interface IMolecularFormulaclone in class ObjectCloneNotSupportedException@TestMethod(value="testSetProperty_Object_Object") public void setProperty(Object description, Object property)
setProperty in interface IMolecularFormuladescription - An object description of the property (most likely a
unique string)property - An object with the property itselfgetProperty(java.lang.Object),
removeProperty(java.lang.Object)@TestMethod(value="testRemoveProperty_Object") public void removeProperty(Object description)
removeProperty in interface IMolecularFormuladescription - The object description of the property (most likely a
unique string)setProperty(java.lang.Object, java.lang.Object),
getProperty(java.lang.Object)@TestMethod(value="testGetProperty_Object") public Object getProperty(Object description)
getProperty in interface IMolecularFormuladescription - An object description of the property (most likely a
unique string)setProperty(java.lang.Object, java.lang.Object),
removeProperty(java.lang.Object)@TestMethod(value="testGetProperties") public Map<Object,Object> getProperties()
getProperties in interface IMolecularFormulasetProperties(java.util.Map<java.lang.Object, java.lang.Object>)@TestMethod(value="testSetProperties_Hashtable") public void setProperties(Map<Object,Object> properties)
setProperties in interface IMolecularFormulaproperties - a Hashtable specifying the property valuesgetProperties()public IChemObjectBuilder getBuilder()
ICDKObjectIChemObjectBuilder for the data classes that extend
this class.getBuilder in interface ICDKObjectIChemObjectBuilder matching this ICDKObject