Class CIPLigandRule
- java.lang.Object
-
- org.openscience.cdk.geometry.cip.rules.CIPLigandRule
-
- All Implemented Interfaces:
Comparator<ILigand>
,ISequenceSubRule<ILigand>
public class CIPLigandRule extends Object implements ISequenceSubRule<ILigand>
Compares toILigand
s based on CIP sequences sub rules. The used CIP sub rules are:MassNumberRule
AtomicNumberRule
- Source code:
- main
- Belongs to CDK module:
- cip
-
-
Constructor Summary
Constructors Constructor Description CIPLigandRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(ILigand ligand1, ILigand ligand2)
Compares two ligands according to the particular sequence sub rule.-
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(ILigand ligand1, ILigand ligand2)
Compares two ligands according to the particular sequence sub rule. It returns 1 if ligand1 takes precedence over ligand2, -1 if ligand2 takes precedence over ligand1, and 0 if they are equal.- Specified by:
compare
in interfaceComparator<ILigand>
- Specified by:
compare
in interfaceISequenceSubRule<ILigand>
- Parameters:
ligand1
- the first of the two ligands to compareligand2
- the second of the two ligands to compare- Returns:
- 1 if ligand1 is of higher precedence than ligand2, -1 if ligand2 is of higher precedence than ligan1, and 0 if they have equal precedence
-
-