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() |
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) |
void |
stateChanged(IChemObjectChangeEvent event) |
String |
toString() |
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()
toString in interface IChemObjecttoString in class Objectpublic Object clone() throws CloneNotSupportedException
ReactionSet and the contained Reactions
too.clone in interface IChemObjectclone in class ChemObjectCloneNotSupportedExceptionpublic void removeAllReactions()
removeAllReactions in interface IReactionSetpublic void stateChanged(IChemObjectChangeEvent event)
stateChanged in interface IChemObjectListenerpublic void removeReaction(IReaction relevantReaction)
removeReaction in interface IReactionSetpublic boolean isEmpty()
isEmpty in interface IReactionSetCopyright © 2017. All rights reserved.