Class InteractorPoolComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.interactor.InteractorPoolComparator
-
- All Implemented Interfaces:
Comparator<InteractorPool>
- Direct Known Subclasses:
UnambiguousExactInteractorPoolComparator
,UnambiguousInteractorPoolComparator
public class InteractorPoolComparator extends Object implements Comparator<InteractorPool>
Basic InteractorPoolComparator. It will first compare the collection of Interactors using InteractorComparator- Since:
17/01/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description InteractorPoolComparator(InteractorComparator interactorComparator)
Creates a new InteractorPoolComparatorInteractorPoolComparator(InteractorComparator interactorComparator, CollectionComparator<Interactor> interactorCollectionComparator)
Creates a new InteractorPoolComparator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(InteractorPool interactorCandidates1, InteractorPool interactorCandidates2)
It will first compare the collection of Interactors using InteractorComparatorComparator<Interactor>
getInteractorBaseComparator()
Getter for the fieldinteractorBaseComparator
.CollectionComparator<Interactor>
getInteractorCollectionComparator()
Getter for the fieldinteractorCollectionComparator
.-
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
-
InteractorPoolComparator
public InteractorPoolComparator(InteractorComparator interactorComparator)
Creates a new InteractorPoolComparator- Parameters:
interactorComparator
- : the interactor comparator required to compare interactors
-
InteractorPoolComparator
public InteractorPoolComparator(InteractorComparator interactorComparator, CollectionComparator<Interactor> interactorCollectionComparator)
Creates a new InteractorPoolComparator- Parameters:
interactorComparator
- : the interactor comparator required to compare interactorsinteractorCollectionComparator
- aCollectionComparator
object.
-
-
Method Detail
-
getInteractorCollectionComparator
public CollectionComparator<Interactor> getInteractorCollectionComparator()
Getter for the field
interactorCollectionComparator
.- Returns:
- a
CollectionComparator
object.
-
getInteractorBaseComparator
public Comparator<Interactor> getInteractorBaseComparator()
Getter for the field
interactorBaseComparator
.- Returns:
- a
Comparator
object.
-
compare
public int compare(InteractorPool interactorCandidates1, InteractorPool interactorCandidates2)
It will first compare the collection of Interactors using InteractorComparator- Specified by:
compare
in interfaceComparator<InteractorPool>
- Parameters:
interactorCandidates1
- aInteractorPool
object.interactorCandidates2
- aInteractorPool
object.- Returns:
- a int.
-
-