Skip to content

Commit

Permalink
Merge pull request #325 from cdk/patch/interfaces
Browse files Browse the repository at this point in the history
Sounds good to me. We don't have applets anymore, where you like to keep the size really low, and Android apps based on the CDK I know of only one (I wish I had time to do more), so no problem.

"Cleaner" is what it is about.
  • Loading branch information
egonw committed May 25, 2017
2 parents da1489f + 2262ec1 commit d6cdc25
Show file tree
Hide file tree
Showing 44 changed files with 11 additions and 40 deletions.
Expand Up @@ -23,7 +23,6 @@
*/
package org.openscience.cdk.io.formats;

import com.google.common.primitives.Ints;
import java.util.List;

/**
Expand Down Expand Up @@ -99,7 +98,7 @@ public IChemFormat format() {
*/
@Override
public int compareTo(MatchResult that) {
return Ints.compare(this.position, that.position);
return Integer.compare(this.position, that.position);
}
}
}
Expand Up @@ -30,13 +30,11 @@
import org.openscience.cdk.interfaces.IAtomContainerSet;
import org.openscience.cdk.interfaces.IBond;
import org.openscience.cdk.interfaces.IChemObjectBuilder;
import org.openscience.cdk.interfaces.IReaction;
import org.openscience.cdk.interfaces.IReactionSet;
import org.openscience.cdk.reaction.IReactionProcess;
import org.openscience.cdk.reaction.ReactionProcessTest;
import org.openscience.cdk.reaction.type.parameters.IParameterReact;
import org.openscience.cdk.reaction.type.parameters.SetReactionCenter;
import org.openscience.cdk.silent.Reaction;
import org.openscience.cdk.silent.SilentChemObjectBuilder;
import org.openscience.cdk.tools.manipulator.AtomContainerManipulator;
import org.openscience.cdk.tools.manipulator.ReactionManipulator;
Expand Down
Expand Up @@ -33,7 +33,6 @@
import org.openscience.cdk.tools.LoggingToolFactory;
import org.openscience.cdk.tools.manipulator.AtomContainerManipulator;

import java.util.AbstractMap;
import java.util.AbstractMap.SimpleImmutableEntry;
import java.util.ArrayList;
import java.util.Arrays;
Expand Down
Expand Up @@ -21,7 +21,6 @@

import org.junit.Assert;
import org.junit.Test;
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.CDKTestCase;

/**
Expand Down
Expand Up @@ -21,7 +21,6 @@

import org.junit.Assert;
import org.junit.Test;
import org.openscience.cdk.exception.NoSuchAtomException;
import org.openscience.cdk.CDKTestCase;

/**
Expand Down
Expand Up @@ -21,7 +21,6 @@

import org.junit.Assert;
import org.junit.Test;
import org.openscience.cdk.exception.NoSuchAtomTypeException;
import org.openscience.cdk.CDKTestCase;

/**
Expand Down
Expand Up @@ -28,7 +28,6 @@
import org.hamcrest.CoreMatchers;
import org.junit.Assert;
import org.junit.Test;
import org.openscience.cdk.exception.NoSuchAtomException;
import org.openscience.cdk.stereo.DoubleBondStereochemistry;
import org.openscience.cdk.stereo.TetrahedralChirality;

Expand Down
Expand Up @@ -18,12 +18,16 @@
*/
package org.openscience.cdk.qsar;

import org.hamcrest.CoreMatchers;
import org.junit.Assert;
import org.junit.Test;
import org.openscience.cdk.CDKTestCase;
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.qsar.result.DoubleResult;

import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.CoreMatchers.is;

/**
* @cdk.module test-standard
*/
Expand Down Expand Up @@ -99,7 +103,6 @@ public void testGetException() {
DoubleResult doubleVal = new DoubleResult(0.7);
DescriptorValue value = new DescriptorValue(spec, new String[0], new Object[0], doubleVal, new String[]{"bla"},
new CDKException("A test exception"));
Assert.assertEquals("org.openscience.cdk.exception.CDKException: A test exception", value.getException()
.toString());
Assert.assertThat(value.getException(), is(instanceOf(CDKException.class)));
}
}
Expand Up @@ -23,7 +23,6 @@
package org.openscience.cdk.fingerprint;

import java.util.AbstractMap;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
Expand Down
Expand Up @@ -23,7 +23,6 @@

import java.util.Iterator;

import org.openscience.cdk.AtomContainer;
import org.openscience.cdk.exception.NoSuchAtomException;
import org.openscience.cdk.graph.PathTools;
import org.openscience.cdk.graph.invariant.exception.BadMatrixFormatException;
Expand Down
Expand Up @@ -30,22 +30,16 @@
import java.io.Reader;
import java.io.StringReader;
import java.util.StringTokenizer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.interfaces.IAtom;
import org.openscience.cdk.interfaces.IAtomContainer;
import org.openscience.cdk.interfaces.IAtomContainerSet;
import org.openscience.cdk.interfaces.IBond;
import org.openscience.cdk.interfaces.IChemFile;
import org.openscience.cdk.interfaces.IChemModel;
import org.openscience.cdk.interfaces.IChemObject;
import org.openscience.cdk.interfaces.IChemSequence;
import org.openscience.cdk.io.formats.INChIPlainTextFormat;
import org.openscience.cdk.io.formats.IResourceFormat;
import org.openscience.cdk.tools.ILoggingTool;
import org.openscience.cdk.tools.LoggingToolFactory;

/**
* Reads the content of a IUPAC/NIST Chemical Identifier (INChI) plain text
Expand Down
Expand Up @@ -58,7 +58,6 @@
import org.openscience.cdk.tools.ILoggingTool;
import org.openscience.cdk.tools.LoggingToolFactory;
import org.openscience.cdk.tools.manipulator.AtomContainerManipulator;
import org.openscience.cdk.tools.periodictable.PeriodicTable;

import javax.vecmath.Point2d;
import javax.vecmath.Point3d;
Expand Down
Expand Up @@ -28,7 +28,6 @@
import org.openscience.cdk.CDKConstants;
import org.openscience.cdk.DefaultChemObjectBuilder;
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.graph.GraphUtil;
import org.openscience.cdk.interfaces.IAtom;
import org.openscience.cdk.interfaces.IAtomContainer;
import org.openscience.cdk.sgroup.Sgroup;
Expand Down
5 changes: 5 additions & 0 deletions storage/ioformats/pom.xml
Expand Up @@ -57,6 +57,11 @@
<version>1.1.4c</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.openscience.cdk</groupId>
<artifactId>cdk-interfaces</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>cdk-interfaces</artifactId>
Expand Down
Expand Up @@ -26,12 +26,10 @@
import org.openscience.cdk.aromaticity.Aromaticity;
import org.openscience.cdk.aromaticity.ElectronDonation;
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.graph.Cycles;
import org.openscience.cdk.interfaces.IAtomContainer;
import org.openscience.cdk.smiles.SmilesGenerator;

import java.util.AbstractMap;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
Expand Down
Expand Up @@ -49,7 +49,6 @@
import org.openscience.cdk.config.Elements;
import org.openscience.cdk.config.IsotopeFactory;
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.exception.InvalidSmilesException;
import org.openscience.cdk.graph.AtomContainerAtomPermutor;
import org.openscience.cdk.graph.AtomContainerBondPermutor;
import org.openscience.cdk.graph.Cycles;
Expand Down
Expand Up @@ -18,20 +18,14 @@
*/
package org.openscience.cdk.charges;

import org.openscience.cdk.CDK;
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.forcefield.mmff.Mmff;
import org.openscience.cdk.interfaces.IAtom;
import org.openscience.cdk.interfaces.IAtomContainer;
import org.openscience.cdk.modeling.builder3d.ForceFieldConfigurator;
import org.openscience.cdk.modeling.builder3d.MMFF94BasedParameterSetReader;
import org.openscience.cdk.tools.ILoggingTool;
import org.openscience.cdk.tools.LoggingToolFactory;

import java.util.Iterator;
import java.util.List;
import java.util.Map;

/**
* The calculation of the MMFF94 partial charges. Charges are stored as atom
* properties ("MMFF94charge") for an AtomContainer ac, values are calculated with:
Expand Down
Expand Up @@ -18,8 +18,6 @@
*/
package org.openscience.cdk.formula.rules;

import java.io.IOException;

import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.interfaces.IMolecularFormula;
import org.openscience.cdk.tools.ILoggingTool;
Expand Down
Expand Up @@ -18,7 +18,6 @@
*/
package org.openscience.cdk.formula.rules;

import java.io.IOException;
import java.util.Iterator;

import org.openscience.cdk.exception.CDKException;
Expand Down
Expand Up @@ -18,7 +18,6 @@
*/
package org.openscience.cdk.formula.rules;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

Expand Down
Expand Up @@ -18,7 +18,6 @@
*/
package org.openscience.cdk.formula.rules;

import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;

Expand Down
Expand Up @@ -18,8 +18,6 @@
*/
package org.openscience.cdk.formula.rules;

import java.io.IOException;

import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.interfaces.IMolecularFormula;
import org.openscience.cdk.tools.ILoggingTool;
Expand Down
Expand Up @@ -55,7 +55,6 @@
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
Expand Down
Expand Up @@ -25,7 +25,6 @@
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.openscience.cdk.CDKConstants;
import org.openscience.cdk.CDKTestCase;
import org.openscience.cdk.DefaultChemObjectBuilder;
import org.openscience.cdk.exception.CDKException;
Expand Down
Expand Up @@ -39,7 +39,6 @@
import org.openscience.cdk.interfaces.IChemObjectBuilder;
import org.openscience.cdk.io.MDLV2000Reader;
import org.openscience.cdk.silent.SilentChemObjectBuilder;
import org.openscience.cdk.smiles.SmilesGenerator;
import org.openscience.cdk.smiles.SmilesParser;
import org.openscience.cdk.tools.CDKHydrogenAdder;
import org.openscience.cdk.tools.manipulator.AtomContainerManipulator;
Expand Down

0 comments on commit d6cdc25

Please sign in to comment.