Package org.openscience.cdk.interfaces
Interface IAtomContainerSet
-
- All Superinterfaces:
Cloneable
,ICDKObject
,IChemObject
,Iterable<IAtomContainer>
- All Known Subinterfaces:
IRingSet
,ISubstance
- All Known Implementing Classes:
AtomContainerSet
,AtomContainerSet
,DebugAtomContainerSet
,DebugRingSet
,DebugSubstance
,RingSet
,RingSet
,Substance
,Substance
public interface IAtomContainerSet extends IChemObject, Iterable<IAtomContainer>
A set of AtomContainers.- Author:
- egonw
- Source code:
- main
- Belongs to CDK module:
- interfaces
-
-
Field Summary
-
Fields inherited from interface org.openscience.cdk.interfaces.IChemObject
ALIPHATIC, AROMATIC, CONJUGATED, HYDROGEN_BOND_ACCEPTOR, HYDROGEN_BOND_DONOR, IN_RING, MAPPED, NOT_IN_RING, PLACED, REACTIVE_CENTER, SINGLE_OR_DOUBLE, TYPEABLE, VISITED
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method 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.Iterable<IAtomContainer>
atomContainers()
Get an Iterable for this AtomContainerSet.IAtomContainer
getAtomContainer(int number)
Returns the AtomContainer at positionnumber
in the container.int
getAtomContainerCount()
Returns the number of AtomContainers in this Container.Double
getMultiplier(int number)
Returns the multiplier for the AtomContainer at positionnumber
in the container.Double
getMultiplier(IAtomContainer container)
Returns the multiplier of the given AtomContainer.Double[]
getMultipliers()
Returns an array of double with the stoichiometric coefficients of the products.boolean
isEmpty()
Returns true if this IAtomContainerSet is empty.default Iterator<IAtomContainer>
iterator()
Iterator for the containers in this set.void
removeAllAtomContainers()
Removes all AtomContainer from this container.void
removeAtomContainer(int pos)
Removes an AtomContainer from this container.void
removeAtomContainer(IAtomContainer atomContainer)
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).void
setMultiplier(int position, Double multiplier)
Sets the coefficient of a AtomContainer to a given value.boolean
setMultiplier(IAtomContainer container, 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.ICDKObject
getBuilder
-
Methods inherited from interface org.openscience.cdk.interfaces.IChemObject
addListener, addProperties, clear, clone, flags, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, is, notifyChanged, notifyChanged, removeListener, removeProperty, set, setFlag, setFlags, setID, setNotification, setProperties, setProperty, toString
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
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 AtomContainercontainer
- 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 setmultiplier
- 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 atposition
- 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 containermultiplier
- 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.
-
iterator
default Iterator<IAtomContainer> iterator()
Iterator for the containers in this set.- Specified by:
iterator
in interfaceIterable<IAtomContainer>
- Returns:
- the iterator
-
getAtomContainer
IAtomContainer getAtomContainer(int number)
Returns the AtomContainer at positionnumber
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 positionnumber
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
-
isEmpty
boolean isEmpty()
Returns true if this IAtomContainerSet is empty.- Returns:
- a boolean indicating if this ring set no atom containers
-
-