@Override public IChemObject newTestObject() { return new ReactionSet(); } });
/** {@inheritDoc} */ @Override public IReaction getReaction(int number) { logger.debug("Getting reaction at: ", number); return super.getReaction(number); }
@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(); }
/** * 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++; notifyChanged(); }
@Before public void setUp() throws Exception { String filename1 = "data/mdl/reaction-1.rxn"; InputStream ins1 = this.getClass().getClassLoader().getResourceAsStream(filename1); MDLRXNReader reader1 = new MDLRXNReader(ins1); ReactionSet set = (ReactionSet) reader1.read(new ReactionSet()); reaction = set.getReaction(0); reader1.close(); }
/** * Removes all Reactions from this container. */ @Override public void removeAllReactions() { for (int pos = this.reactionCount - 1; pos >= 0; pos--) { this.reactions[pos] = null; } this.reactionCount = 0; notifyChanged(); }
@Override public void removeReaction(IReaction relevantReaction) { for (int i = reactionCount - 1; i >= 0; i--) { if (reactions[i] == relevantReaction) removeReaction(i); } }
/** {@inheritDoc} */ @Override public Object clone() throws CloneNotSupportedException { Object clone = null; try { clone = super.clone(); } catch (Exception exception) { logger.error("Could not clone DebugAtom: " + exception.getMessage(), exception); logger.debug(exception); } return clone; }
/** {@inheritDoc} */ @Override public int getReactionCount() { logger.debug("Getting reaction count: ", super.getReactionCount()); return super.getReactionCount(); }
/** {@inheritDoc} */ @Override public Iterable<IReaction> reactions() { logger.debug("Getting reactionIterable"); return super.reactions(); }
/** {@inheritDoc} */ @Override public void addListener(IChemObjectListener col) { logger.debug("Adding listener: ", col); super.addListener(col); }
/** {@inheritDoc} */ @Override public void addProperties(Map<Object, Object> properties) { logger.debug("Setting properties: ", properties); super.addProperties(properties); }
/** * Removes all Reactions from this container. */ @Override public void removeAllReactions() { for (int pos = this.reactionCount - 1; pos >= 0; pos--) { this.reactions[pos] = null; } this.reactionCount = 0; notifyChanged(); }
@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++; notifyChanged(); }
clone.setOfReactions = (IReactionSet) ((ReactionSet) setOfReactions).clone(); } else { clone.setOfReactions = null;
@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(); }
@Override public void stateChanged(IChemObjectChangeEvent event) { notifyChanged(event); }
@Override public void remove() { removeReaction(--pointer); }