Class UnambiguousCooperativityEvidenceComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.cooperativity.CooperativityEvidenceComparator
-
- psidev.psi.mi.jami.utils.comparator.cooperativity.UnambiguousCooperativityEvidenceComparator
-
- All Implemented Interfaces:
Comparator<CooperativityEvidence>
public class UnambiguousCooperativityEvidenceComparator extends CooperativityEvidenceComparator
Unambiguous comparator for cooperativityEvidence It will first compare the publications using UnambiguousPublicationComparator and then the evidenceMethods using UnambiguousCvTermComparator- Since:
22/05/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description UnambiguousCooperativityEvidenceComparator()
Constructor for UnambiguousCooperativityEvidenceComparator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
areEquals(CooperativityEvidence evidence1, CooperativityEvidence evidence2)
Use UnambiguousCooperativityEvidenceComparator to know if two cooperativityEvidences are equals.int
compare(CooperativityEvidence evidence1, CooperativityEvidence evidence2)
It will first compare the publications using DefaultPublicationComparator and then the evidenceMethods using DefaultCvTermComparatorUnambiguousPublicationComparator
getPublicationComparator()
Getter for the fieldpublicationComparator
.static int
hashCode(CooperativityEvidence evidence)
hashCode-
Methods inherited from class psidev.psi.mi.jami.utils.comparator.cooperativity.CooperativityEvidenceComparator
getCvTermsCollectionComparator
-
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
-
getPublicationComparator
public UnambiguousPublicationComparator getPublicationComparator()
Getter for the field
publicationComparator
.- Overrides:
getPublicationComparator
in classCooperativityEvidenceComparator
- Returns:
- a
Comparator
object.
-
compare
public int compare(CooperativityEvidence evidence1, CooperativityEvidence evidence2)
It will first compare the publications using DefaultPublicationComparator and then the evidenceMethods using DefaultCvTermComparator- Specified by:
compare
in interfaceComparator<CooperativityEvidence>
- Overrides:
compare
in classCooperativityEvidenceComparator
- Parameters:
evidence1
- aCooperativityEvidence
object.evidence2
- aCooperativityEvidence
object.- Returns:
- a int.
-
areEquals
public static boolean areEquals(CooperativityEvidence evidence1, CooperativityEvidence evidence2)
Use UnambiguousCooperativityEvidenceComparator to know if two cooperativityEvidences are equals.- Parameters:
evidence1
- aCooperativityEvidence
object.evidence2
- aCooperativityEvidence
object.- Returns:
- true if the two cooperativityEvidences are equal
-
hashCode
public static int hashCode(CooperativityEvidence evidence)
hashCode
- Parameters:
evidence
- aCooperativityEvidence
object.- Returns:
- the hashcode consistent with the equals method for this comparator
-
-