ERROR! The markdown supplied could not be parsed correctly. Did you forget to surround a code snippet with "~~~~"?
Using the 'ordinal()' method of enum is very bad. The [documentation](http://docs.oracle.com/javase/7/docs/api/java/lang/Enum.html#ordinal()) recommends only using it for "_sophisticated enum-based data structures, such as EnumSet and EnumMap._". There are several places in the CDK where ordinal is used to represent the number of connections for that Order. e.g. SINGLE.ordinal() + 1 = 1. This patch adds a method to the enum that provides the number of connections. This allows use to removal all instances of "order.ordinal() + 1" and also if/else statements to count/sum bond orders can be minimised. Unfortunately the if/else couldn't be completely removed as we may have a null bond order. One explicit point of review should be on SMSD where the ordinal was being added to the bond energy [Line 139]( https://github.com/johnmay/cdk/commit/5113d4a66662fc2c97a070dfc461f62111411d2a#L14L139). The change does not affect unit tests so this needs a look to see what the ordinal was being used for. patch is on branch: [johnmay/patch/1.4.x.removing-order-ordinal-usage](https://github.com/johnmay/cdk/commits/patch/cdk-1.4.x/removing-order-ordinal-usage)