public class DebugAtomContainerSet extends AtomContainerSet implements IAtomContainerSet
atomContainerCount, atomContainers, growArraySize, multipliers
Constructor and Description |
---|
DebugAtomContainerSet() |
Modifier and Type | Method and Description |
---|---|
void |
add(IAtomContainerSet atomContainerSet)
Adds all atomContainers in the AtomContainerSet to this container.
|
void |
addAtomContainer(IAtomContainer atomContainer)
Adds an atomContainer to this container.
|
void |
addAtomContainer(IAtomContainer atomContainer,
double multiplier)
Adds an atomContainer to this container with the given
multiplier.
|
void |
addListener(IChemObjectListener col)
Use this to add yourself to this IChemObject as a listener.
|
void |
addProperties(Map<Object,Object> properties)
Sets the properties of this object.
|
Iterable<IAtomContainer> |
atomContainers()
Get an iterator for this AtomContainerSet.
|
Object |
clone()
Clones this AtomContainerSet and its content.
|
IAtomContainer |
getAtomContainer(int number)
Returns the AtomContainer at position
number in the
container. |
int |
getAtomContainerCount()
Returns the number of AtomContainers in this Container.
|
IChemObjectBuilder |
getBuilder()
Returns a
IChemObjectBuilder for the data classes that extend
this class. |
boolean |
getFlag(int flagType)
Returns the value of a given 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 |
getMultiplier(IAtomContainer container)
Returns the multiplier of the given AtomContainer.
|
Double |
getMultiplier(int number)
Returns the multiplier for the AtomContainer at position
number in the
container. |
Double[] |
getMultipliers()
Returns an array of double with the stoichiometric coefficients
of the products.
|
Map<Object,Object> |
getProperties()
Returns a Map with the IChemObject's properties.
|
<T> T |
getProperty(Object description)
Returns a property for the IChemObject.
|
boolean |
isEmpty()
Returns true if this IAtomContainerSet is empty.
|
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 |
removeAllAtomContainers()
Removes all AtomContainer from this container.
|
void |
removeAtomContainer(IAtomContainer atomContainer)
Removes an AtomContainer from this container.
|
void |
removeAtomContainer(int pos)
Removes an AtomContainer from this container.
|
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 |
replaceAtomContainer(int position,
IAtomContainer container)
Replace the AtomContainer at a specific position (array has to be large enough).
|
void |
setFlag(int flagType,
boolean flagValue)
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 |
setMultiplier(IAtomContainer container,
Double multiplier)
Sets the coefficient of a AtomContainer to a given value.
|
void |
setMultiplier(int position,
Double multiplier)
Sets the coefficient of a AtomContainer to a given value.
|
boolean |
setMultipliers(Double[] newMultipliers)
Sets the multipliers of the AtomContainers.
|
void |
setProperty(Object description,
Object property)
Sets a property for a IChemObject.
|
growAtomContainerArray, sortAtomContainers, stateChanged, toString
compare, getFlagValue, getNotification, getProperty, setNotification, setProperties, shallowCopy
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
sortAtomContainers
getFlagValue, getNotification, getProperty, setNotification, setProperties, toString
public void addListener(IChemObjectListener col)
addListener
in interface IChemObject
addListener
in class ChemObject
col
- the ChemObjectListenerChemObject.removeListener(org.openscience.cdk.interfaces.IChemObjectListener)
public int getListenerCount()
getListenerCount
in interface IChemObject
getListenerCount
in class ChemObject
public void removeListener(IChemObjectListener col)
removeListener
in interface IChemObject
removeListener
in class ChemObject
col
- The ChemObjectListener to be removedChemObject.addListener(org.openscience.cdk.interfaces.IChemObjectListener)
public void notifyChanged()
notifyChanged
in interface IChemObject
notifyChanged
in class ChemObject
public void notifyChanged(IChemObjectChangeEvent evt)
notifyChanged
in interface IChemObject
notifyChanged
in class ChemObject
evt
- A ChemObjectChangeEvent pointing to the source of where
the change happenedpublic void setProperty(Object description, Object property)
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)
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 <T> T getProperty(Object description)
getProperty
in interface IChemObject
getProperty
in class ChemObject
T
- generic return typedescription
- 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()
getProperties
in interface IChemObject
getProperties
in class ChemObject
ChemObject.addProperties(java.util.Map<java.lang.Object, java.lang.Object>)
public String getID()
getID
in interface IChemObject
getID
in class ChemObject
ChemObject.setID(java.lang.String)
public void setID(String identifier)
setID
in interface IChemObject
setID
in class ChemObject
identifier
- a String representing the ID valueChemObject.getID()
public void setFlag(int flagType, boolean flagValue)
CDKConstants.ISAROMATIC
or CDKConstants.VISITED
). The flags are
intrinsic internal properties and should not be used to store custom
values, please use IChemObject.setProperty(Object, Object)
.
// set this chem object to be aromatic
chemObject.setFlag(CDKConstants.ISAROMATIC, Boolean.TRUE);
// ...
// indicate we have visited this chem object
chemObject.setFlag(CDKConstants.VISITED, Boolean.TRUE);
setFlag
in interface IChemObject
setFlag
in class ChemObject
flagType
- flag to set the value forflagValue
- value to assign to flagIChemObject.getFlag(int)
,
CDKConstants
public boolean getFlag(int flagType)
CDKConstants.ISAROMATIC
).
if(chemObject.getFlag(CDKConstants.ISAROMATIC)){
// handle aromatic flag on this chem object
}
getFlag
in interface IChemObject
getFlag
in class ChemObject
flagType
- flag to retrieve the value offlag_type
is setIChemObject.setFlag(int, boolean)
,
CDKConstants
public void addProperties(Map<Object,Object> properties)
addProperties
in interface IChemObject
addProperties
in class ChemObject
properties
- a Hashtable specifying the property valuesChemObject.getProperties()
public void setFlags(boolean[] flagsNew)
setFlags
in interface IChemObject
setFlags
in class ChemObject
flagsNew
- the new flags.ChemObject.getFlags()
public boolean[] getFlags()
getFlags
in interface IChemObject
getFlags
in class ChemObject
ChemObject.setFlags(boolean[])
public Object clone() throws CloneNotSupportedException
clone
in interface IChemObject
clone
in class AtomContainerSet
CloneNotSupportedException
- if the IChemObject cannot be clonedpublic IChemObjectBuilder getBuilder()
IChemObjectBuilder
for the data classes that extend
this class.getBuilder
in interface ICDKObject
getBuilder
in class ChemObject
IChemObjectBuilder
matching this ICDKObject
public void addAtomContainer(IAtomContainer atomContainer)
addAtomContainer
in interface IAtomContainerSet
addAtomContainer
in class AtomContainerSet
atomContainer
- The atomContainer to be added to this containerpublic void removeAtomContainer(IAtomContainer atomContainer)
removeAtomContainer
in interface IAtomContainerSet
removeAtomContainer
in class AtomContainerSet
atomContainer
- The atomContainer to be removed from this containerpublic void removeAllAtomContainers()
removeAllAtomContainers
in interface IAtomContainerSet
removeAllAtomContainers
in class AtomContainerSet
public void removeAtomContainer(int pos)
removeAtomContainer
in interface IAtomContainerSet
removeAtomContainer
in class AtomContainerSet
pos
- The position of the AtomContainer to be removed from this containerpublic void replaceAtomContainer(int position, IAtomContainer container)
replaceAtomContainer
in interface IAtomContainerSet
replaceAtomContainer
in class AtomContainerSet
position
- position in array for AtomContainercontainer
- the replacement AtomContainerpublic boolean setMultiplier(IAtomContainer container, Double multiplier)
setMultiplier
in interface IAtomContainerSet
setMultiplier
in class AtomContainerSet
container
- The AtomContainer for which the multiplier is setmultiplier
- The new multiplier for the AtomContatinerAtomContainerSet.getMultiplier(IAtomContainer)
public void setMultiplier(int position, Double multiplier)
setMultiplier
in interface IAtomContainerSet
setMultiplier
in class AtomContainerSet
position
- The position of the AtomContainer for which the multiplier is
set in [0,..]multiplier
- The new multiplier for the AtomContatiner at
position
AtomContainerSet.getMultiplier(int)
public Double[] getMultipliers()
getMultipliers
in interface IAtomContainerSet
getMultipliers
in class AtomContainerSet
AtomContainerSet.setMultipliers(java.lang.Double[])
public boolean setMultipliers(Double[] newMultipliers)
setMultipliers
in interface IAtomContainerSet
setMultipliers
in class AtomContainerSet
newMultipliers
- The new multipliers for the AtomContainers in this setAtomContainerSet.getMultipliers()
public void addAtomContainer(IAtomContainer atomContainer, double multiplier)
addAtomContainer
in interface IAtomContainerSet
addAtomContainer
in class AtomContainerSet
atomContainer
- The atomContainer to be added to this containermultiplier
- The multiplier of this atomContainerpublic void add(IAtomContainerSet atomContainerSet)
add
in interface IAtomContainerSet
add
in class AtomContainerSet
atomContainerSet
- The AtomContainerSetpublic Iterable<IAtomContainer> atomContainers()
atomContainers
in interface IAtomContainerSet
atomContainers
in class AtomContainerSet
public IAtomContainer getAtomContainer(int number)
number
in the
container.getAtomContainer
in interface IAtomContainerSet
getAtomContainer
in class AtomContainerSet
number
- The position of the AtomContainer to be returned.number
.public Double getMultiplier(int number)
number
in the
container.getMultiplier
in interface IAtomContainerSet
getMultiplier
in class AtomContainerSet
number
- The position of the multiplier of the AtomContainer to be returned.number
.AtomContainerSet.setMultiplier(int, Double)
public Double getMultiplier(IAtomContainer container)
getMultiplier
in interface IAtomContainerSet
getMultiplier
in class AtomContainerSet
container
- The AtomContainer for which the multiplier is givenAtomContainerSet.setMultiplier(IAtomContainer, Double)
public int getAtomContainerCount()
getAtomContainerCount
in interface IAtomContainerSet
getAtomContainerCount
in class AtomContainerSet
public boolean isEmpty()
isEmpty
in interface IAtomContainerSet
isEmpty
in class AtomContainerSet
Copyright © 2018. All Rights Reserved.