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 booleanareEquals(Interactor interactor1, Interactor interactor2)Use DefaultConfidenceComparator to know if two confidences are equals.UnambiguousAliasComparatorgetAliasComparator()getAliasComparatorUnambiguousExternalIdentifierComparatorgetIdentifierComparator()getIdentifierComparatorstatic inthashCode(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:
getIdentifierComparatorin classInteractorBaseComparator- Returns:
- a
UnambiguousExternalIdentifierComparatorobject.
-
getAliasComparator
public UnambiguousAliasComparator getAliasComparator()
getAliasComparator
- Overrides:
getAliasComparatorin classInteractorBaseComparator- Returns:
- a
UnambiguousAliasComparatorobject.
-
areEquals
public static boolean areEquals(Interactor interactor1, Interactor interactor2)
Use DefaultConfidenceComparator to know if two confidences are equals.- Parameters:
interactor1- aInteractorobject.interactor2- aInteractorobject.- Returns:
- true if the two confidences are equal
-
hashCode
public static int hashCode(Interactor interactor)
hashCode
- Parameters:
interactor- aInteractorobject.- Returns:
- the hashcode consistent with the equals method for this comparator
-
-