Class FeatureEvidenceComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.feature.FeatureEvidenceComparator
-
- All Implemented Interfaces:
Comparator<FeatureEvidence>
- Direct Known Subclasses:
UnambiguousFeatureEvidenceComparator
public class FeatureEvidenceComparator extends Object implements Comparator<FeatureEvidence>
Basic FeatureEvidence comparator. It will first compare feature detection methods using AbstractCvTermComparator. If both feature detection methods are the same, it will use a AbstractFeatureBaseComparator to compare basic properties of a feature. This comparator will ignore all the other properties of an experimental feature.- Since:
16/01/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description FeatureEvidenceComparator(Comparator<Feature> featureComparator, Comparator<CvTerm> cvTermComparator)
Creates a new FeatureEvidenceComparator.FeatureEvidenceComparator(Comparator<Feature> featureComparator, CollectionComparator<CvTerm> cvTermComparator)
Constructor for FeatureEvidenceComparator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(FeatureEvidence experimentalFeature1, FeatureEvidence experimentalFeature2)
It will first use a AbstractFeatureBaseComparator to compare basic properties of a feature.CollectionComparator<CvTerm>
getCvTermCollectionComparators()
Getter for the fieldcvTermCollectionComparators
.Comparator<Feature>
getFeatureComparator()
Getter for the fieldfeatureComparator
.-
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
-
FeatureEvidenceComparator
public FeatureEvidenceComparator(Comparator<Feature> featureComparator, Comparator<CvTerm> cvTermComparator)
Creates a new FeatureEvidenceComparator.- Parameters:
featureComparator
- : feature comparator required for comparing basic feature propertiescvTermComparator
- aComparator
object.
-
FeatureEvidenceComparator
public FeatureEvidenceComparator(Comparator<Feature> featureComparator, CollectionComparator<CvTerm> cvTermComparator)
Constructor for FeatureEvidenceComparator.
- Parameters:
featureComparator
- aComparator
object.cvTermComparator
- aCollectionComparator
object.
-
-
Method Detail
-
getFeatureComparator
public Comparator<Feature> getFeatureComparator()
Getter for the field
featureComparator
.- Returns:
- a
Comparator
object.
-
getCvTermCollectionComparators
public CollectionComparator<CvTerm> getCvTermCollectionComparators()
Getter for the field
cvTermCollectionComparators
.- Returns:
- a
CollectionComparator
object.
-
compare
public int compare(FeatureEvidence experimentalFeature1, FeatureEvidence experimentalFeature2)
It will first use a AbstractFeatureBaseComparator to compare basic properties of a feature. If the basic feature properties are the same, it will then compare feature detection methods using AbstractCvTermComparator. This comparator will ignore all the other properties of an experimental feature.- Specified by:
compare
in interfaceComparator<FeatureEvidence>
- Parameters:
experimentalFeature1
- aFeatureEvidence
object.experimentalFeature2
- aFeatureEvidence
object.- Returns:
- a int.
-
-