org.openscience.cdk.interfaces
Interface IAtomContainerSet

All Superinterfaces:
Cloneable, ICDKObject, IChemObject
All Known Subinterfaces:
IRingSet
All Known Implementing Classes:
AtomContainerSet, AtomContainerSet, DebugAtomContainerSet, DebugRingSet, RingSet, RingSet

public interface IAtomContainerSet
extends IChemObject

A set of AtomContainers.

Author:
egonw
Belongs to CDK module:
interfaces
Source code:
cdk-1.4.x

Method Summary
 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.
 Iterable<IAtomContainer> atomContainers()
          Get an Iterable for this AtomContainerSet.
 IAtomContainer getAtomContainer(int number)
          Returns the AtomContainer at position number in the container.
 int getAtomContainerCount()
          Returns the number of AtomContainers in this Container.
 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.
 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 replaceAtomContainer(int position, IAtomContainer container)
          Replace the AtomContainer at a specific position (array has to be large enough).
 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 sortAtomContainers(Comparator<IAtomContainer> comparator)
          Sort the AtomContainers using a provided Comparator.
 
Methods inherited from interface org.openscience.cdk.interfaces.IChemObject
addListener, clone, getFlag, getFlags, getID, getListenerCount, getNotification, getProperties, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty, toString
 
Methods inherited from interface org.openscience.cdk.interfaces.ICDKObject
getBuilder
 

Method Detail

addAtomContainer

void addAtomContainer(IAtomContainer atomContainer)
Adds an atomContainer to this container.

Parameters:
atomContainer - The atomContainer to be added to this container

removeAtomContainer

void removeAtomContainer(IAtomContainer atomContainer)
Removes an AtomContainer from this container.

Parameters:
atomContainer - The atomContainer to be removed from this container

removeAllAtomContainers

void removeAllAtomContainers()
Removes all AtomContainer from this container.


removeAtomContainer

void removeAtomContainer(int pos)
Removes an AtomContainer from this container.

Parameters:
pos - The position of the AtomContainer to be removed from this container

replaceAtomContainer

void replaceAtomContainer(int position,
                          IAtomContainer container)
Replace the AtomContainer at a specific position (array has to be large enough).

Parameters:
position - position in array for AtomContainer
container - the replacement AtomContainer

setMultiplier

boolean setMultiplier(IAtomContainer container,
                      Double multiplier)
Sets the coefficient of a AtomContainer to a given value.

Parameters:
container - The AtomContainer for which the multiplier is set
multiplier - The new multiplier for the AtomContatiner
Returns:
true if multiplier has been set
See Also:
getMultiplier(IAtomContainer)

setMultiplier

void setMultiplier(int position,
                   Double multiplier)
Sets the coefficient of a AtomContainer to a given value.

Parameters:
position - The position of the AtomContainer for which the multiplier is set in [0,..]
multiplier - The new multiplier for the AtomContatiner at position
See Also:
getMultiplier(int)

getMultipliers

Double[] getMultipliers()
Returns an array of double with the stoichiometric coefficients of the products.

Returns:
The multipliers for the AtomContainer's in this set
See Also:
setMultipliers(java.lang.Double[])

setMultipliers

boolean setMultipliers(Double[] newMultipliers)
Sets the multipliers of the AtomContainers.

Parameters:
newMultipliers - The new multipliers for the AtomContainers in this set
Returns:
true if multipliers have been set.
See Also:
getMultipliers()

addAtomContainer

void addAtomContainer(IAtomContainer atomContainer,
                      double multiplier)
Adds an atomContainer to this container with the given multiplier.

Parameters:
atomContainer - The atomContainer to be added to this container
multiplier - The multiplier of this atomContainer

add

void add(IAtomContainerSet atomContainerSet)
Adds all atomContainers in the AtomContainerSet to this container.

Parameters:
atomContainerSet - The AtomContainerSet

atomContainers

Iterable<IAtomContainer> atomContainers()
Get an Iterable for this AtomContainerSet.

Returns:
A new Iterable for this AtomContainerSet.

getAtomContainer

IAtomContainer getAtomContainer(int number)
Returns the AtomContainer at position number in the container.

Parameters:
number - The position of the AtomContainer to be returned.
Returns:
The AtomContainer at position number .

getMultiplier

Double getMultiplier(int number)
Returns the multiplier for the AtomContainer at position number in the container.

Parameters:
number - The position of the multiplier of the AtomContainer to be returned.
Returns:
The multiplier for the AtomContainer at position number .
See Also:
setMultiplier(int, Double)

getMultiplier

Double getMultiplier(IAtomContainer container)
Returns the multiplier of the given AtomContainer.

Parameters:
container - The AtomContainer for which the multiplier is given
Returns:
-1, if the given molecule is not a container in this set
See Also:
setMultiplier(IAtomContainer, Double)

getAtomContainerCount

int getAtomContainerCount()
Returns the number of AtomContainers in this Container.

Returns:
The number of AtomContainers in this Container

sortAtomContainers

void sortAtomContainers(Comparator<IAtomContainer> comparator)
Sort the AtomContainers using a provided Comparator.

Parameters:
comparator - defines the sorting method