Generified comparators, removing redundant casts

Change-Id: I266c7c45501f91c04577d572870e858d2140b171
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
corrected handling of null value in the TreeNodeComparator. Previous if any node or atom were null the comparator would return '0' which is incorrect. If one is null and the other is not the objects are not equal.

Change-Id: I928a6832ec15cdf5fad67a9dec41bcec51b05db1
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Corrected canonical label sorting in the SmilesGenerator. This canonical labels are long and thus when the difference between two values is taken the result may be larger then the largest possible integer. This in rare cases cause the value to overflow and thus make the comparator non-transitive.

Change-Id: Ibaba56bb5e559bbf250459689e6b0cc5b286fa03
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Make sure the tests are also run with JUnit4

Change-Id: Ie304f2f8ea4cba60e4f02f899b9ec70c236912aa
OK, simple fix: reset the test graph before each test method call

Change-Id: Ic581d65471ce29e55f9680a3345158970c346f4a
Replaced subtraction based comparison. When the difference (which is a double) is converted to an integer the result may overflow. This overflow can occur in rare cases but would cause the comparator to be non-transitive.

Change-Id: Ic7deea389f63273202288e6d11cc19af94f08d63
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Replaced subtraction based comparator. This comparator is unlikely to overflow but the safety of using the equalities ensures the proper behaviour of this comparator.

Change-Id: I4cf311f327e53754e189c5734147a245446495ac
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Corrected null handling on AtomContainer 2D centre comparison. Previous if either container was null the comparator would incorrectly return '0' indicating they were equal. The method was changed to always provide a minimum Point2d when an atom container is null. This will sort all null containers lower then non-null containers.

Change-Id: I49d919c7d0cf0ea17a65e2a031c1a827bdbbbb50
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Updated comparator on AtomPlacer. The comparator now uses the built in Integer comparator. To avoid null pointer exceptions the access to the weight value is wrapped in a private method which return the minimum integer value when the weight is not set (i.e. null).
Updated PMD to version 5.0.1

Change-Id: Ibb369c1eefdf6e65ad5d32cc99495f82ad9c0908
Also updated the other two PMD config files for 5.0.1

Change-Id: Ic862e2856a697b1a29856c49c7ccc69c0f66c78b
Also updated the Eclipse .classpath

Change-Id: I21e6057736021e342bff62e78a488171c3b4c5a6
And the Groovy deps for the CDKSourceCodeWriterTest

Change-Id: I79e0a709bd3b641bce219e3c0154b2dd72cdfa20
Properly implemented Isotope.compare() for data and silent

Change-Id: Iff60038106b126062f2566749c5e719f4672bc7a
Signed-off-by: John May <john.wilkinsonmay@gmail.com>
Added a missing dependency

Change-Id: I65535e895bbff1cfba23ec84da79c9080a3d625d
Added a missing dependency on the test data

Change-Id: Ie88b82a64af0d799eadf543ac9104dc5723dc38c
Typed the input class and added support for IChemFile.class input

Change-Id: Iabdb1ca4650dc51c424ea7b95fa7d996013de101
Signed-off-by: John May <john.wilkinsonmay@gmail.com>
Small fixes: remove STDOUT use and proper int-based assertEquals() method

Change-Id: I8dfa14c1b50f1aad44ca3db43dc089add51133a4
Signed-off-by: John May <john.wilkinsonmay@gmail.com>
Properly pad the resulting descriptor value list to MAX_PROTON_COUNT, fixing two failing unit tests

Change-Id: Ic679ec53cb222d1cafc092d50e8156656a2bd8d1
Signed-off-by: John May <john.wilkinsonmay@gmail.com>
C1C1 is an invalid SMILES; expect an thrown error

Change-Id: Ib965ecbafe67fc82e556ce60210cefee2fc89e2f
Signed-off-by: John May <john.wilkinsonmay@gmail.com>