/** * Adds an reaction to this container. * * @param reaction The reaction to be added to this container */ @Override public void addReaction(IReaction reaction) { if (reactionCount + 1 >= reactions.length) growReactionArray(); reactions[reactionCount] = reaction; reactionCount++; }
@Override public void stateChanged(IChemObjectChangeEvent event) { notifyChanged(event); }
@Override public void removeReaction(IReaction relevantReaction) { for (int i = reactionCount - 1; i >= 0; i--) { if (reactions[i] == relevantReaction) removeReaction(i); } }
@Override public IChemObject newTestObject() { return new ReactionSet(); } });
@Override public String toString() { StringBuffer buffer = new StringBuffer(32); buffer.append("ReactionSet("); buffer.append(this.hashCode()); buffer.append(", R=").append(getReactionCount()).append(", "); for (IReaction reaction : reactions()) { buffer.append(reaction.toString()); } buffer.append(')'); return buffer.toString(); }
@BeforeClass public static void setUp() { setTestObjectBuilder(new ITestObjectBuilder() { @Override public IChemObject newTestObject() { return new ReactionSet(); } }); }
@Override public String toString() { StringBuffer buffer = new StringBuffer(32); buffer.append("ReactionSet("); buffer.append(this.hashCode()); buffer.append(", R=").append(getReactionCount()).append(", "); for (IReaction reaction : reactions()) { buffer.append(reaction.toString()); } buffer.append(')'); return buffer.toString(); }
@Test public void testReactionSet() { IReactionSet rs = new ReactionSet(); Assert.assertNotNull(rs); }
@Override public void removeReaction(IReaction relevantReaction) { for (int i = reactionCount - 1; i >= 0; i--) { if (reactions[i] == relevantReaction) removeReaction(i); } }
/** * Adds an reaction to this container. * * @param reaction The reaction to be added to this container */ @Override public void addReaction(IReaction reaction) { if (reactionCount + 1 >= reactions.length) growReactionArray(); reactions[reactionCount] = reaction; reactionCount++; }
@Override public void stateChanged(IChemObjectChangeEvent event) { notifyChanged(event); }
reaction11.addProduct(water); IReactionSet reactionSet = new ReactionSet(); reactionSet.addReaction(reaction11);
@Override public void remove() { removeReaction(--pointer); }
@Override public void remove() { removeReaction(--pointer); }