Class UnambiguousExactCausalRelationshipComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.participant.CausalRelationshipComparator
-
- psidev.psi.mi.jami.utils.comparator.participant.UnambiguousExactCausalRelationshipComparator
-
- All Implemented Interfaces:
Comparator<CausalRelationship>
public class UnambiguousExactCausalRelationshipComparator extends CausalRelationshipComparator
Unambiguous exact comparator for CausalRelationship It will first compare the relationType using UnambiguousCvTermComparator. If both relationTypes are identical, it will compare the target using UnambiguousExactEntityComparator- Since:
22/05/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description UnambiguousExactCausalRelationshipComparator()Creates a new UnambiguousExactCausalRelationshipComparator with DefaultCvTermComparator and DefaultExactParticipantBaseComparator
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanareEquals(CausalRelationship rel1, CausalRelationship rel2)Use UnambiguousExactCausalRelationshipComparator to know if two causalRelationShip are equals.intcompare(CausalRelationship rel1, CausalRelationship rel2)It will first compare the relationType using UnambiguousCvTermComparator.UnambiguousCvTermComparatorgetCvTermComparator()Getter for the fieldcvTermComparator.UnambiguousExactEntityComparatorgetParticipantComparator()Getter for the fieldparticipantComparator.static inthashCode(CausalRelationship rel)hashCode-
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
-
getCvTermComparator
public UnambiguousCvTermComparator getCvTermComparator()
Getter for the field
cvTermComparator.- Overrides:
getCvTermComparatorin classCausalRelationshipComparator- Returns:
- a
Comparatorobject.
-
getParticipantComparator
public UnambiguousExactEntityComparator getParticipantComparator()
Description copied from class:CausalRelationshipComparatorGetter for the field
participantComparator.- Overrides:
getParticipantComparatorin classCausalRelationshipComparator- Returns:
- a
EntityComparatorobject.
-
compare
public int compare(CausalRelationship rel1, CausalRelationship rel2)
It will first compare the relationType using UnambiguousCvTermComparator. If both relationTypes are identical, it will compare the target using UnambiguousExactParticipantBaseComparator- Specified by:
comparein interfaceComparator<CausalRelationship>- Overrides:
comparein classCausalRelationshipComparator- Parameters:
rel1- : first causal relationshiprel2- : second causal relationship- Returns:
- the comparison value
-
areEquals
public static boolean areEquals(CausalRelationship rel1, CausalRelationship rel2)
Use UnambiguousExactCausalRelationshipComparator to know if two causalRelationShip are equals.- Parameters:
rel1- aCausalRelationshipobject.rel2- aCausalRelationshipobject.- Returns:
- true if the two causalRelationShip are equal
-
hashCode
public static int hashCode(CausalRelationship rel)
hashCode
- Parameters:
rel- aCausalRelationshipobject.- Returns:
- the hashcode consistent with the equals method for this comparator
-
-