Skip to content
Browse files

Proper typing of the DefaultIteratingChemObjectReader, so that other …

…classes can safely extend it (thanx to Nina)

Signed-off-by: ngn <jeliazkova.nina@gmail.com>
Signed-off-by: Rajarshi Guha <rajarshi.guha@gmail.com>
  • Loading branch information...
1 parent b84587f commit de6712105ae5946ead66afe7dfd32c650f8ee176 @egonw egonw committed with rajarshi Dec 11, 2011
View
5 src/main/org/openscience/cdk/io/iterator/DefaultIteratingChemObjectReader.java
@@ -23,8 +23,8 @@
import java.util.List;
import org.openscience.cdk.exception.CDKException;
+import org.openscience.cdk.interfaces.IChemObject;
import org.openscience.cdk.io.IChemObjectReader;
-import org.openscience.cdk.io.IChemObjectReader.Mode;
import org.openscience.cdk.io.IChemObjectReaderErrorHandler;
import org.openscience.cdk.io.ISimpleChemObjectReader;
import org.openscience.cdk.io.listener.IChemObjectIOListener;
@@ -37,7 +37,8 @@
* @cdk.module io
* @cdk.githash
*/
-public abstract class DefaultIteratingChemObjectReader {
+public abstract class DefaultIteratingChemObjectReader<T extends IChemObject>
+implements IIteratingChemObjectReader<T> {
protected IChemObjectReader.Mode mode = IChemObjectReader.Mode.RELAXED;
protected IChemObjectReaderErrorHandler errorHandler = null;
View
4 src/main/org/openscience/cdk/io/iterator/IteratingMDLReader.java
@@ -81,8 +81,8 @@
* @cdk.keyword file format, MDL molfile
* @cdk.keyword file format, SDF
*/
-public class IteratingMDLReader extends DefaultIteratingChemObjectReader
-implements IChemObjectIOListener, IIteratingChemObjectReader<IAtomContainer> {
+public class IteratingMDLReader extends DefaultIteratingChemObjectReader<IAtomContainer>
+implements IChemObjectIOListener {
private BufferedReader input;
private static ILoggingTool logger =
View
5 src/main/org/openscience/cdk/io/iterator/IteratingPCCompoundASNReader.java
@@ -35,7 +35,6 @@
import org.openscience.cdk.annotations.TestMethod;
import org.openscience.cdk.interfaces.IAtomContainer;
import org.openscience.cdk.interfaces.IChemFile;
-import org.openscience.cdk.interfaces.IChemObject;
import org.openscience.cdk.interfaces.IChemObjectBuilder;
import org.openscience.cdk.io.PCCompoundASNReader;
import org.openscience.cdk.io.formats.IResourceFormat;
@@ -58,8 +57,8 @@
* @cdk.keyword file format, ASN
* @cdk.keyword PubChem
*/
-public class IteratingPCCompoundASNReader extends DefaultIteratingChemObjectReader
-implements IIteratingChemObjectReader<IAtomContainer> {
+public class IteratingPCCompoundASNReader
+extends DefaultIteratingChemObjectReader<IAtomContainer> {
private BufferedReader input;
private static ILoggingTool logger =
View
4 src/main/org/openscience/cdk/io/iterator/IteratingPCCompoundXMLReader.java
@@ -55,8 +55,8 @@
* @cdk.keyword file format, ASN
* @cdk.keyword PubChem
*/
-public class IteratingPCCompoundXMLReader extends DefaultIteratingChemObjectReader
-implements IIteratingChemObjectReader<IAtomContainer> {
+public class IteratingPCCompoundXMLReader
+extends DefaultIteratingChemObjectReader<IAtomContainer> {
private Reader primarySource;
private XmlPullParser parser;
View
4 src/main/org/openscience/cdk/io/iterator/IteratingPCSubstancesXMLReader.java
@@ -54,8 +54,8 @@
* @cdk.keyword file format, ASN
* @cdk.keyword PubChem
*/
-public class IteratingPCSubstancesXMLReader extends DefaultIteratingChemObjectReader
-implements IIteratingChemObjectReader<IChemModel> {
+public class IteratingPCSubstancesXMLReader
+extends DefaultIteratingChemObjectReader<IChemModel> {
private Reader primarySource;
private XmlPullParser parser;
View
4 src/main/org/openscience/cdk/io/iterator/IteratingSMILESReader.java
@@ -60,8 +60,8 @@
* @cdk.keyword file format, SMILES
*/
@TestClass("org.openscience.cdk.io.iterator.IteratingSMILESReaderTest")
-public class IteratingSMILESReader extends DefaultIteratingChemObjectReader
-implements IIteratingChemObjectReader<IAtomContainer> {
+public class IteratingSMILESReader
+extends DefaultIteratingChemObjectReader<IAtomContainer> {
private BufferedReader input;
private static ILoggingTool logger =

0 comments on commit de67121

Please sign in to comment.
Something went wrong with that request. Please try again.