public class ReactionSet extends ChemObject implements Serializable, IReactionSet, IChemObjectListener, Cloneable
Iterator reactions = reactionSet.reactions();
while (reactions.hasNext()) {
IReaction reaction = (IReaction)reactions.next();
}
and
for (int i=0; i < reactionSet.getReactionCount(); i++) {
IReaction reaction = reactionSet.getReaction(i);
}
| Constructor and Description |
|---|
ReactionSet()
Constructs an empty ReactionSet.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addReaction(IReaction reaction)
Adds an reaction to this container.
|
Object |
clone()
Clones this
ReactionSet and the contained Reactions
too. |
IReaction |
getReaction(int number)
Returns the Reaction at position
number in the
container. |
int |
getReactionCount()
Returns the number of Reactions in this Container.
|
boolean |
isEmpty()
Returns true if this IReactionSet is empty.
|
Iterable<IReaction> |
reactions()
Get an iterator for this reaction set.
|
void |
removeAllReactions()
Removes all Reactions from this container.
|
void |
removeReaction(int pos)
Remove a reaction from this set.
|
void |
removeReaction(IReaction relevantReaction)
Removes all instances of a reaction from this IReactionSet.
|
void |
stateChanged(IChemObjectChangeEvent event)
Called by objects to notify objects that implemented this interface
and registered with them as ChemObjectListeners.
|
String |
toString()
Returns a one line description of this IChemObject.
|
addListener, addProperties, compare, getBuilder, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty, shallowCopyequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddListener, addProperties, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setPropertygetBuilderpublic void addReaction(IReaction reaction)
addReaction in interface IReactionSetreaction - The reaction to be added to this containerpublic void removeReaction(int pos)
removeReaction in interface IReactionSetpos - The position of the reaction to be removed.public IReaction getReaction(int number)
number in the
container.getReaction in interface IReactionSetnumber - The position of the Reaction to be returnednumberpublic Iterable<IReaction> reactions()
reactions in interface IReactionSetpublic int getReactionCount()
getReactionCount in interface IReactionSetpublic String toString()
IChemObjecttoString in interface IChemObjecttoString in class Objectpublic Object clone() throws CloneNotSupportedException
ReactionSet and the contained Reactions
too.clone in interface IChemObjectclone in class ChemObjectCloneNotSupportedException - if the IChemObject cannot be clonedpublic void removeAllReactions()
removeAllReactions in interface IReactionSetpublic void stateChanged(IChemObjectChangeEvent event)
IChemObjectListenerstateChanged in interface IChemObjectListenerevent - a ChemObjectChangeEvent objectpublic void removeReaction(IReaction relevantReaction)
IReactionSetremoveReaction in interface IReactionSetrelevantReaction - the reaction to removepublic boolean isEmpty()
isEmpty in interface IReactionSetCopyright © 2021. All rights reserved.