Class UnambiguousExactEntityBaseComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.participant.EntityBaseComparator
-
- psidev.psi.mi.jami.utils.comparator.participant.UnambiguousExactEntityBaseComparator
-
- All Implemented Interfaces:
Comparator<Entity>
public class UnambiguousExactEntityBaseComparator extends EntityBaseComparator
Unambiguous exact entity comparator It will first compare the interactors using UnambiguousExactInteractorComparator. If both interactors are the same, it will look at the stoichiometry (participant with lower stoichiometry will come first).This comparator will ignore all the other properties of a participant.
- Since:
18/01/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description UnambiguousExactEntityBaseComparator()UnambiguousExactEntityBaseComparator(UnambiguousExactInteractorComparator comparator)Constructor for UnambiguousExactEntityBaseComparator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanareEquals(Entity participant1, Entity participant2)Use UnambiguousExactParticipantBaseComparator to know if two participants are equals.intcompare(Entity participant1, Entity participant2)It will first compare the interactors using UnambiguousExactInteractorComparator.UnambiguousExactInteractorComparatorgetInteractorComparator()Getter for the fieldinteractorComparator.static inthashCode(Entity participant)-
Methods inherited from class psidev.psi.mi.jami.utils.comparator.participant.EntityBaseComparator
getStoichiometryComparator, isIgnoreInteractors, isIgnoreStoichiometry, setIgnoreInteractors, setIgnoreStoichiometry
-
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
-
-
-
-
Constructor Detail
-
UnambiguousExactEntityBaseComparator
public UnambiguousExactEntityBaseComparator()
Creates a new UnambiguousExactParticipantBaseComparator. It will use a UnambiguousExactInteractorComparator to compare interactors, a UnambiguousCvTermComparator to compare biological roles.
-
UnambiguousExactEntityBaseComparator
public UnambiguousExactEntityBaseComparator(UnambiguousExactInteractorComparator comparator)
Constructor for UnambiguousExactEntityBaseComparator.
- Parameters:
comparator- aUnambiguousExactInteractorComparatorobject.
-
-
Method Detail
-
areEquals
public static boolean areEquals(Entity participant1, Entity participant2)
Use UnambiguousExactParticipantBaseComparator to know if two participants are equals.
-
hashCode
public static int hashCode(Entity participant)
hashCode
- Parameters:
participant- aEntityobject.- Returns:
- the hashcode consistent with the equals method for this comparator
-
getInteractorComparator
public UnambiguousExactInteractorComparator getInteractorComparator()
Description copied from class:EntityBaseComparatorGetter for the field
interactorComparator.- Overrides:
getInteractorComparatorin classEntityBaseComparator- Returns:
- a
InteractorComparatorobject.
-
compare
public int compare(Entity participant1, Entity participant2)
It will first compare the interactors using UnambiguousExactInteractorComparator. If both interactors are the same, it will look at the stoichiometry (participant with lower stoichiometry will come first).- Specified by:
comparein interfaceComparator<Entity>- Overrides:
comparein classEntityBaseComparator- Parameters:
participant1- aEntityobject.participant2- aEntityobject.- Returns:
- a int.
-
-