A
- public interface PriorityRule<A> extends java.util.Comparator<Ligand<A>>
Comparator
can be used to prioritise ligands however the
compareLigands(Ligand, Ligand)
also adds meta data about the type of the descriptor via the Comparison
Comparison
,
Comparator
Modifier and Type | Interface and Description |
---|---|
static class |
PriorityRule.Type |
Modifier and Type | Method and Description |
---|---|
Comparison |
compareLigands(Ligand<A> o1,
Ligand<A> o2)
Analogous to
Comparator.compare(Object, Object) the prioritise method combines the Descriptor.Type to the
order and can indicate what comparison method was used. |
PriorityRule.Type |
getRuleType() |
Descriptor.Type |
getType()
Access the descriptor type this rule indicates.
|
Priority |
prioritise(java.util.List<Ligand<A>> ligands)
Prioritises ligands using the provided sorter and indicates whether the ligands were unique.
|
int |
recursiveCompare(Ligand<A> o1,
Ligand<A> o2) |
void |
setHalt(boolean value)
Indicates the rule should halt.
|
void |
setSorter(LigandSorter<A> sorter)
Allows injection of a ligand sorter.
|
compare, comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
PriorityRule.Type getRuleType()
Priority prioritise(java.util.List<Ligand<A>> ligands)
ligands
- a list of ligands to prioritisevoid setSorter(LigandSorter<A> sorter)
sorter
- the ligand sorter to useComparison compareLigands(Ligand<A> o1, Ligand<A> o2)
Comparator.compare(Object, Object)
the prioritise method combines the Descriptor.Type
to the
order and can indicate what comparison method was used. The single comparison cases the type doesn't change
however when using a combined comparator the type may change depending on which comparator was used.o1
- first ligando2
- second ligandComparator.compare(Object, Object)
Descriptor.Type getType()
void setHalt(boolean value)
value
-