Class RingSizeComparator
java.lang.Object
org.openscience.cdk.tools.manipulator.RingSizeComparator
- All Implemented Interfaces:
Comparator<IRing>
- Source code:
- main
- Belongs to CDK module:
- standard
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Flag to denote that the set is order with the largest ring firststatic final int
Flag to denote that the set is order with the smallest ring first -
Constructor Summary
ConstructorsConstructorDescriptionRingSizeComparator
(int order) Constructs a new comparator to sort rings by size. -
Method Summary
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
-
Field Details
-
LARGE_FIRST
public static final int LARGE_FIRSTFlag to denote that the set is order with the largest ring first- See Also:
-
SMALL_FIRST
public static final int SMALL_FIRSTFlag to denote that the set is order with the smallest ring first- See Also:
-
-
Constructor Details
-
RingSizeComparator
public RingSizeComparator(int order) Constructs a new comparator to sort rings by size.- Parameters:
order
- Sort order: either RingSet.SMALL_FIRST or RingSet.LARGE_FIRST.
-
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<IRing>
- Throws:
ClassCastException
-