Class AtomContainerComparator
- java.lang.Object
-
- org.openscience.cdk.tools.manipulator.AtomContainerComparator
-
- All Implemented Interfaces:
Comparator<IAtomContainer>
public class AtomContainerComparator extends Object implements Comparator<IAtomContainer>
Compares two IAtomContainers for order with the following criteria with decreasing priority:
- Compare atom count
- Compare molecular weight (heavy atoms only)
- Compare bond count
- Compare sum of bond orders (heavy atoms only)
If no difference can be found with the above criteria, the IAtomContainers are considered equal.
- Author:
- Andreas Schueller
- Source code:
- main
- Belongs to CDK module:
- standard
- Created on:
- 2007-09-05
-
-
Constructor Summary
Constructors Constructor Description AtomContainerComparator()
Creates a new instance of AtomContainerComparator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(IAtomContainer o1, IAtomContainer o2)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
compare
public int compare(IAtomContainer o1, IAtomContainer o2)
- Specified by:
compare
in interfaceComparator<IAtomContainer>
-
-