Class UnambiguousExactBioactiveEntityComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.interactor.BioactiveEntityComparator
-
- psidev.psi.mi.jami.utils.comparator.interactor.UnambiguousExactBioactiveEntityComparator
-
- All Implemented Interfaces:
Comparator<BioactiveEntity>
public class UnambiguousExactBioactiveEntityComparator extends BioactiveEntityComparator
unambiguous Exact bioactive entity comparator. It will first use UnambiguousExactInteractorBaseComparator to compare the basic interactor properties. If the basic interactor properties are the same, It will look first for CHEBI identifier (the interactor with a non null CHEBI identifier will always come first). If the CHEBI identifiers are not set, it will look at the standard inchi key (the interactor with a non null standard inchi key will always come first). If the standard inchi keys are identical, it will look at the smile (the interactor with a non null smile will always come first). If the smiles are identical, it will look at the standard Inchi (the interactor with a non null standard inchi will always come first). This comparator will ignore all the other properties of an interactor.- Since:
17/01/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description UnambiguousExactBioactiveEntityComparator()
Creates a new UnambiguousExactBioactiveEntityComparator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
areEquals(BioactiveEntity entity1, BioactiveEntity entity2)
Use UnambiguousExactBioactiveEntityComparator to know if two bioactive entities are equals.int
compare(BioactiveEntity bioactiveEntity1, BioactiveEntity bioactiveEntity2)
It will first use UnambiguousInteractorBaseComparator to compare the basic interactor properties.UnambiguousExactInteractorBaseComparator
getInteractorComparator()
getInteractorComparator-
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(BioactiveEntity bioactiveEntity1, BioactiveEntity bioactiveEntity2)
Description copied from class:BioactiveEntityComparator
It will first use UnambiguousInteractorBaseComparator to compare the basic interactor properties. If the basic interactor properties are the same, It will look first for CHEBI identifier (the interactor with a non null CHEBI identifier will always come first). If the CHEBI identifiers are not set, it will look at the standard inchi key (the interactor with a non null standard inchi key will always come first). If the standard inchi keys are identical, it will look at the smile (the interactor with a non null smile will always come first). If the smiles are identical, it will look at the standard Inchi (the interactor with a non null standard inchi will always come first). This comparator will ignore all the other properties of an interactor.- Specified by:
compare
in interfaceComparator<BioactiveEntity>
- Overrides:
compare
in classBioactiveEntityComparator
- Parameters:
bioactiveEntity1
- aBioactiveEntity
object.bioactiveEntity2
- aBioactiveEntity
object.- Returns:
- a int.
-
getInteractorComparator
public UnambiguousExactInteractorBaseComparator getInteractorComparator()
getInteractorComparator
- Overrides:
getInteractorComparator
in classBioactiveEntityComparator
- Returns:
- a
Comparator
object.
-
areEquals
public static boolean areEquals(BioactiveEntity entity1, BioactiveEntity entity2)
Use UnambiguousExactBioactiveEntityComparator to know if two bioactive entities are equals.- Parameters:
entity1
- aBioactiveEntity
object.entity2
- aBioactiveEntity
object.- Returns:
- true if the two bioactive entities are equal
-
-