Skip to content

Instantly share code, notes, and snippets.

@gilleain
Created March 30, 2011 09:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gilleain/894106 to your computer and use it in GitHub Desktop.
Save gilleain/894106 to your computer and use it in GitHub Desktop.
patch file
From 5a86e14eef2b516dab2c4e369376d76bb6dfdd7b Mon Sep 17 00:00:00 2001
From: maclean <gilleain.torrance@gmail.com>
Date: Wed, 30 Mar 2011 07:59:03 +0100
Subject: [PATCH] Use IAtomContainer instead of AtomContainer in AtomContainerSet
---
src/main/org/openscience/cdk/AtomContainerSet.java | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/org/openscience/cdk/AtomContainerSet.java b/src/main/org/openscience/cdk/AtomContainerSet.java
index 9f4658a..e8d40e5 100644
--- a/src/main/org/openscience/cdk/AtomContainerSet.java
+++ b/src/main/org/openscience/cdk/AtomContainerSet.java
@@ -70,7 +70,7 @@ public class AtomContainerSet extends ChemObject implements Serializable, IAtomC
/** Constructs an empty AtomContainerSet. */
public AtomContainerSet() {
atomContainerCount = 0;
- atomContainers = new AtomContainer[growArraySize];
+ atomContainers = new IAtomContainer[growArraySize];
multipliers = new Double[growArraySize];
}
@@ -322,7 +322,7 @@ public class AtomContainerSet extends ChemObject implements Serializable, IAtomC
*/
protected void growAtomContainerArray() {
growArraySize = atomContainers.length;
- AtomContainer[] newatomContainers = new AtomContainer[atomContainers.length + growArraySize];
+ IAtomContainer[] newatomContainers = new IAtomContainer[atomContainers.length + growArraySize];
System.arraycopy(atomContainers, 0, newatomContainers, 0, atomContainers.length);
atomContainers = newatomContainers;
Double[] newMultipliers = new Double[multipliers.length + growArraySize];
@@ -367,7 +367,7 @@ public class AtomContainerSet extends ChemObject implements Serializable, IAtomC
*/
public Object clone() throws CloneNotSupportedException {
AtomContainerSet clone = (AtomContainerSet)super.clone();
- clone.atomContainers = new AtomContainer[atomContainerCount];
+ clone.atomContainers = new IAtomContainer[atomContainerCount];
clone.atomContainerCount = 0;
for (int i = 0; i < atomContainerCount; i++) {
clone.addAtomContainer((IAtomContainer)atomContainers[i].clone());
--
1.7.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment