Class UnambiguousInteractorBaseComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.interactor.InteractorBaseComparator
-
- psidev.psi.mi.jami.utils.comparator.interactor.UnambiguousInteractorBaseComparator
-
- All Implemented Interfaces:
Comparator<Interactor>
public class UnambiguousInteractorBaseComparator extends InteractorBaseComparator
Unambiguous interactor comparator It will only compare identifiers if one interactor does have identifiers using UnambiguousIdentifierComparator. Otherwise, it will first compare shortNames (case sensitive) fullnames(case sensitive) and if the shortNames and fullnames are the same, it will compare the aliases using UnambiguousAliasComparator. This comparator will ignore all the other properties of an interactor.- Since:
21/12/12
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description UnambiguousInteractorBaseComparator()
Constructor for UnambiguousInteractorBaseComparator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
areEquals(Interactor interactor1, Interactor interactor2)
Use DefaultConfidenceComparator to know if two confidences are equals.UnambiguousAliasComparator
getAliasComparator()
getAliasComparatorUnambiguousExternalIdentifierComparator
getIdentifierComparator()
getIdentifierComparatorstatic int
hashCode(Interactor interactor)
hashCode-
Methods inherited from class psidev.psi.mi.jami.utils.comparator.interactor.InteractorBaseComparator
compare, getAliasCollectionComparator, getIdentifierCollectionComparator
-
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
-
getIdentifierComparator
public UnambiguousExternalIdentifierComparator getIdentifierComparator()
getIdentifierComparator
- Overrides:
getIdentifierComparator
in classInteractorBaseComparator
- Returns:
- a
UnambiguousExternalIdentifierComparator
object.
-
getAliasComparator
public UnambiguousAliasComparator getAliasComparator()
getAliasComparator
- Overrides:
getAliasComparator
in classInteractorBaseComparator
- Returns:
- a
UnambiguousAliasComparator
object.
-
areEquals
public static boolean areEquals(Interactor interactor1, Interactor interactor2)
Use DefaultConfidenceComparator to know if two confidences are equals.- Parameters:
interactor1
- aInteractor
object.interactor2
- aInteractor
object.- Returns:
- true if the two confidences are equal
-
hashCode
public static int hashCode(Interactor interactor)
hashCode
- Parameters:
interactor
- aInteractor
object.- Returns:
- the hashcode consistent with the equals method for this comparator
-
-