public class DebugReaction extends Reaction implements IReaction
IReaction.Direction
Constructor and Description |
---|
DebugReaction() |
Modifier and Type | Method and Description |
---|---|
void |
addAgent(IMolecule agent)
Adds an agent to this reaction.
|
void |
addListener(IChemObjectListener col)
Use this to add yourself to this IChemObject as a listener.
|
void |
addProduct(IMolecule product)
Adds a product to this reaction.
|
void |
addProduct(IMolecule product,
Double coefficient)
Adds a product to this reaction.
|
void |
addReactant(IMolecule reactant)
Adds a reactant to this reaction.
|
void |
addReactant(IMolecule reactant,
Double coefficient)
Adds a reactant to this reaction with a stoichiometry coefficient.
|
Object |
clone()
Clones this
Reaction and its content. |
IMoleculeSet |
getAgents()
Returns a MoleculeSet containing the agents in this reaction.
|
IChemObjectBuilder |
getBuilder()
Returns a
IChemObjectBuilder for the data classes that extend
this class. |
IReaction.Direction |
getDirection()
Returns the direction of the reaction.
|
boolean |
getFlag(int flag_type)
Returns the value of some flag.
|
boolean[] |
getFlags()
Returns the whole set of flags.
|
String |
getID()
Returns the identifier (ID) of this object.
|
int |
getListenerCount()
Returns the number of ChemObjectListeners registered with this object.
|
Double |
getProductCoefficient(IMolecule product)
Returns the stoichiometry coefficient of the given product.
|
Double[] |
getProductCoefficients()
Returns an array of double with the stoichiometric coefficients
of the products.
|
int |
getProductCount()
Returns the number of products in this reaction.
|
IMoleculeSet |
getProducts()
Returns a MoleculeSet containing the products of this reaction.
|
Map<Object,Object> |
getProperties()
Returns a Map with the IChemObject's properties.
|
Object |
getProperty(Object description)
Returns a property for the IChemObject.
|
Double |
getReactantCoefficient(IMolecule reactant)
Returns the stoichiometry coefficient of the given reactant.
|
Double[] |
getReactantCoefficients()
Returns an array of double with the stoichiometric coefficients
of the reactants.
|
int |
getReactantCount()
Returns the number of reactants in this reaction.
|
IMoleculeSet |
getReactants()
Returns a MoleculeSet containing the reactants in this reaction.
|
void |
notifyChanged()
This should be triggered by an method that changes the content of an object
to that the registered listeners can react to it.
|
void |
notifyChanged(IChemObjectChangeEvent evt)
This should be triggered by an method that changes the content of an object
to that the registered listeners can react to it.
|
void |
removeListener(IChemObjectListener col)
Use this to remove a ChemObjectListener from the ListenerList of this
IChemObject.
|
void |
removeProperty(Object description)
Removes a property for a IChemObject.
|
void |
setDirection(IReaction.Direction direction)
Sets the direction of the reaction.
|
void |
setFlag(int flag_type,
boolean flag_value)
Sets the value of some flag.
|
void |
setFlags(boolean[] flagsNew)
Sets the whole set of flags.
|
void |
setID(String identifier)
Sets the identifier (ID) of this object.
|
boolean |
setProductCoefficient(IMolecule product,
Double coefficient)
Sets the coefficient of a a product to a given value.
|
boolean |
setProductCoefficients(Double[] coefficients)
Sets the coefficient of the products.
|
void |
setProducts(IMoleculeSet products)
Assigns a MoleculeSet to the products of this reaction.
|
void |
setProperties(Map<Object,Object> properties)
Sets the properties of this object.
|
void |
setProperty(Object description,
Object property)
Sets a property for a IChemObject.
|
boolean |
setReactantCoefficient(IMolecule reactant,
Double coefficient)
Sets the coefficient of a a reactant to a given value.
|
boolean |
setReactantCoefficients(Double[] coefficients)
Sets the coefficients of the reactants.
|
void |
setReactants(IMoleculeSet reactants)
Assigns a MoleculeSet to the reactants in this reaction.
|
addMapping, getMapping, getMappingCount, mappings, removeMapping, toString
compare, getNotification, setNotification, shallowCopy
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addMapping, getMapping, getMappingCount, mappings, removeMapping
getNotification, setNotification, toString
public void addListener(IChemObjectListener col)
ChemObject
addListener
in interface IChemObject
addListener
in class ChemObject
col
- the ChemObjectListenerChemObject.removeListener(org.openscience.cdk.interfaces.IChemObjectListener)
public int getListenerCount()
ChemObject
getListenerCount
in interface IChemObject
getListenerCount
in class ChemObject
public void removeListener(IChemObjectListener col)
ChemObject
removeListener
in interface IChemObject
removeListener
in class ChemObject
col
- The ChemObjectListener to be removedChemObject.addListener(org.openscience.cdk.interfaces.IChemObjectListener)
public void notifyChanged()
ChemObject
notifyChanged
in interface IChemObject
notifyChanged
in class ChemObject
public void notifyChanged(IChemObjectChangeEvent evt)
ChemObject
notifyChanged
in interface IChemObject
notifyChanged
in class ChemObject
evt
- A ChemObjectChangeEvent pointing to the source of where
the change happendpublic void setProperty(Object description, Object property)
ChemObject
setProperty
in interface IChemObject
setProperty
in class ChemObject
description
- An object description of the property (most likely a
unique string)property
- An object with the property itselfChemObject.getProperty(java.lang.Object)
,
ChemObject.removeProperty(java.lang.Object)
public void removeProperty(Object description)
ChemObject
removeProperty
in interface IChemObject
removeProperty
in class ChemObject
description
- The object description of the property (most likely a
unique string)ChemObject.setProperty(java.lang.Object, java.lang.Object)
,
ChemObject.getProperty(java.lang.Object)
public Object getProperty(Object description)
ChemObject
getProperty
in interface IChemObject
getProperty
in class ChemObject
description
- An object description of the property (most likely a
unique string)ChemObject.setProperty(java.lang.Object, java.lang.Object)
,
ChemObject.removeProperty(java.lang.Object)
public Map<Object,Object> getProperties()
ChemObject
getProperties
in interface IChemObject
getProperties
in class ChemObject
ChemObject.setProperties(java.util.Map<java.lang.Object, java.lang.Object>)
public String getID()
ChemObject
getID
in interface IChemObject
getID
in class ChemObject
ChemObject.setID(java.lang.String)
public void setID(String identifier)
ChemObject
setID
in interface IChemObject
setID
in class ChemObject
identifier
- a String representing the ID valueChemObject.getID()
public void setFlag(int flag_type, boolean flag_value)
ChemObject
setFlag
in interface IChemObject
setFlag
in class ChemObject
flag_type
- Flag to setflag_value
- Value to assign to flagChemObject.getFlag(int)
public boolean getFlag(int flag_type)
ChemObject
getFlag
in interface IChemObject
getFlag
in class ChemObject
flag_type
- Flag to retrieve the value offlag_type
is setChemObject.setFlag(int, boolean)
public void setProperties(Map<Object,Object> properties)
ChemObject
setProperties
in interface IChemObject
setProperties
in class ChemObject
properties
- a Hashtable specifying the property valuesChemObject.getProperties()
public void setFlags(boolean[] flagsNew)
ChemObject
setFlags
in interface IChemObject
setFlags
in class ChemObject
flagsNew
- the new flags.ChemObject.getFlags()
public boolean[] getFlags()
ChemObject
getFlags
in interface IChemObject
getFlags
in class ChemObject
ChemObject.setFlags(boolean[])
public Object clone() throws CloneNotSupportedException
Reaction
Reaction
and its content.clone
in interface IChemObject
clone
in class Reaction
CloneNotSupportedException
- if the IChemObject cannot be clonedpublic IChemObjectBuilder getBuilder()
ICDKObject
IChemObjectBuilder
for the data classes that extend
this class.getBuilder
in interface ICDKObject
getBuilder
in class ChemObject
IChemObjectBuilder
matching this ICDKObject
public int getReactantCount()
Reaction
getReactantCount
in interface IReaction
getReactantCount
in class Reaction
public int getProductCount()
Reaction
getProductCount
in interface IReaction
getProductCount
in class Reaction
public IMoleculeSet getReactants()
Reaction
getReactants
in interface IReaction
getReactants
in class Reaction
Reaction.setReactants(org.openscience.cdk.interfaces.IMoleculeSet)
public void setReactants(IMoleculeSet reactants)
Reaction
setReactants
in interface IReaction
setReactants
in class Reaction
reactants
- The new set of reactantsReaction.getReactants()
public IMoleculeSet getProducts()
Reaction
getProducts
in interface IReaction
getProducts
in class Reaction
Reaction.setProducts(org.openscience.cdk.interfaces.IMoleculeSet)
public void setProducts(IMoleculeSet products)
Reaction
setProducts
in interface IReaction
setProducts
in class Reaction
products
- The new set of productsReaction.getProducts()
public IMoleculeSet getAgents()
Reaction
getAgents
in interface IReaction
getAgents
in class Reaction
Reaction.addAgent(org.openscience.cdk.interfaces.IMolecule)
public void addReactant(IMolecule reactant)
Reaction
addReactant
in interface IReaction
addReactant
in class Reaction
reactant
- Molecule added as reactant to this reactionReaction.getReactants()
public void addAgent(IMolecule agent)
Reaction
addAgent
in interface IReaction
addAgent
in class Reaction
agent
- Molecule added as agent to this reactionReaction.getAgents()
public void addReactant(IMolecule reactant, Double coefficient)
Reaction
addReactant
in interface IReaction
addReactant
in class Reaction
reactant
- Molecule added as reactant to this reactioncoefficient
- Stoichiometry coefficient for this moleculeReaction.getReactants()
public void addProduct(IMolecule product)
Reaction
addProduct
in interface IReaction
addProduct
in class Reaction
product
- Molecule added as product to this reactionReaction.getProducts()
public void addProduct(IMolecule product, Double coefficient)
Reaction
addProduct
in interface IReaction
addProduct
in class Reaction
product
- Molecule added as product to this reactioncoefficient
- Stoichiometry coefficient for this moleculeReaction.getProducts()
public Double getReactantCoefficient(IMolecule reactant)
Reaction
getReactantCoefficient
in interface IReaction
getReactantCoefficient
in class Reaction
reactant
- Reactant for which the coefficient is returned.Reaction.setReactantCoefficient(org.openscience.cdk.interfaces.IMolecule, java.lang.Double)
public Double getProductCoefficient(IMolecule product)
Reaction
getProductCoefficient
in interface IReaction
getProductCoefficient
in class Reaction
product
- Product for which the coefficient is returned.Reaction.setProductCoefficient(org.openscience.cdk.interfaces.IMolecule, java.lang.Double)
public boolean setReactantCoefficient(IMolecule reactant, Double coefficient)
Reaction
setReactantCoefficient
in interface IReaction
setReactantCoefficient
in class Reaction
reactant
- Reactant for which the coefficient is setcoefficient
- The new coefficient for the given reactantReaction.getReactantCoefficient(org.openscience.cdk.interfaces.IMolecule)
public boolean setProductCoefficient(IMolecule product, Double coefficient)
Reaction
setProductCoefficient
in interface IReaction
setProductCoefficient
in class Reaction
product
- Product for which the coefficient is setcoefficient
- The new coefficient for the given productReaction.getProductCoefficient(org.openscience.cdk.interfaces.IMolecule)
public Double[] getReactantCoefficients()
Reaction
getReactantCoefficients
in interface IReaction
getReactantCoefficients
in class Reaction
Reaction.setReactantCoefficients(java.lang.Double[])
public Double[] getProductCoefficients()
Reaction
getProductCoefficients
in interface IReaction
getProductCoefficients
in class Reaction
Reaction.setProductCoefficients(java.lang.Double[])
public boolean setReactantCoefficients(Double[] coefficients)
Reaction
setReactantCoefficients
in interface IReaction
setReactantCoefficients
in class Reaction
coefficients
- An array of double's containing the coefficients of the reactantsReaction.getReactantCoefficients()
public boolean setProductCoefficients(Double[] coefficients)
Reaction
setProductCoefficients
in interface IReaction
setProductCoefficients
in class Reaction
coefficients
- An array of double's containing the coefficients of the productsReaction.getProductCoefficients()
public void setDirection(IReaction.Direction direction)
Reaction
setDirection
in interface IReaction
setDirection
in class Reaction
direction
- The new reaction directionReaction.getDirection()
public IReaction.Direction getDirection()
Reaction
getDirection
in interface IReaction
getDirection
in class Reaction
IReaction.Direction
,
Reaction.setDirection(org.openscience.cdk.interfaces.IReaction.Direction)