public class AdductFormula extends Object implements Iterable<IMolecularFormula>, IAdductFormula, Cloneable
Examples:
[C2H4O2+Na]+| Constructor and Description |
|---|
AdductFormula()
Constructs an empty AdductFormula.
|
AdductFormula(IMolecularFormula formula)
Constructs an AdductFormula with a copy AdductFormula of another
AdductFormula (A shallow copy, i.e., with the same objects as in
the original AdductFormula).
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(IMolecularFormulaSet formulaSet)
Adds all molecularFormulas in the AdductFormula to this chemObject.
|
void |
addMolecularFormula(IMolecularFormula formula)
Adds an molecularFormula to this chemObject.
|
Object |
clone()
Clones this AdductFormula object and its content.
|
boolean |
contains(IIsotope isotope)
True, if the AdductFormula contains the given IIsotope object and not
the instance.
|
boolean |
contains(IMolecularFormula formula)
True, if the AdductFormula contains the given IMolecularFormula object.
|
IChemObjectBuilder |
getBuilder() |
Integer |
getCharge()
Returns the partial charge of this Adduct.
|
int |
getIsotopeCount()
Checks a set of Nodes for the number of different isotopes in the
adduct formula.
|
int |
getIsotopeCount(IIsotope isotope)
Checks a set of Nodes for the occurrence of the isotope in the
adduct formula from a particular isotope.
|
IMolecularFormula |
getMolecularFormula(int position)
Returns the MolecularFormula at position
number in the
chemObject. |
Iterable<IIsotope> |
isotopes()
Returns an Iterator for looping over all isotopes in this adduct formula.
|
Iterator<IMolecularFormula> |
iterator()
Returns an Iterator for looping over all IMolecularFormula
in this adduct formula.
|
Iterable<IMolecularFormula> |
molecularFormulas()
Returns an Iterable for looping over all IMolecularFormula
in this adduct formula.
|
void |
removeAllMolecularFormulas()
Removes all IMolecularFormula from this chemObject.
|
void |
removeMolecularFormula(IMolecularFormula formula)
Removes an IMolecularFormula from this chemObject.
|
void |
removeMolecularFormula(int position)
Removes an MolecularFormula from this chemObject.
|
void |
setCharge(Integer charge)
Deprecated.
|
int |
size()
Returns the number of MolecularFormulas in this AdductFormula.
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic AdductFormula()
AdductFormula(IMolecularFormula)public AdductFormula(IMolecularFormula formula)
formula - An MolecularFormula to copy fromAdductFormula()public void addMolecularFormula(IMolecularFormula formula)
addMolecularFormula in interface IMolecularFormulaSetformula - The molecularFormula to be added to this chemObjectpublic void add(IMolecularFormulaSet formulaSet)
add in interface IMolecularFormulaSetformulaSet - The MolecularFormulaSetpublic boolean contains(IIsotope isotope)
contains in interface IAdductFormulaisotope - The IIsotope this AdductFormula is searched forpublic Integer getCharge()
getCharge in interface IAdductFormulasetCharge(java.lang.Integer)public int getIsotopeCount(IIsotope isotope)
getIsotopeCount in interface IAdductFormulaisotope - The IIsotope to look forgetIsotopeCount()public int getIsotopeCount()
getIsotopeCount in interface IAdductFormulagetIsotopeCount(IIsotope)public Iterable<IIsotope> isotopes()
isotopes in interface IAdductFormulapublic void setCharge(Integer charge)
setCharge in interface IAdductFormulacharge - The partial chargegetCharge()public Iterable<IMolecularFormula> molecularFormulas()
molecularFormulas in interface IMolecularFormulaSetpublic Iterator<IMolecularFormula> iterator()
iterator in interface Iterable<IMolecularFormula>public int size()
size in interface IMolecularFormulaSetpublic boolean contains(IMolecularFormula formula)
contains in interface IMolecularFormulaSetformula - The IMolecularFormula this AdductFormula is searched forpublic IMolecularFormula getMolecularFormula(int position)
number in the
chemObject.getMolecularFormula in interface IMolecularFormulaSetposition - The position of the IMolecularFormula to be returned.number .public void removeAllMolecularFormulas()
removeAllMolecularFormulas in interface IMolecularFormulaSetpublic void removeMolecularFormula(IMolecularFormula formula)
removeMolecularFormula in interface IMolecularFormulaSetformula - The IMolecularFormula to be removed from this chemObjectpublic void removeMolecularFormula(int position)
removeMolecularFormula in interface IMolecularFormulaSetposition - The position of the MolecularFormula to be removed from this chemObjectpublic Object clone() throws CloneNotSupportedException
clone in interface IAdductFormulaclone in interface IMolecularFormulaSetclone in class ObjectCloneNotSupportedExceptionpublic IChemObjectBuilder getBuilder()
getBuilder in interface ICDKObjectCopyright © 2017. All rights reserved.