Class UnambiguousFeatureEvidenceComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.feature.FeatureEvidenceComparator
-
- psidev.psi.mi.jami.utils.comparator.feature.UnambiguousFeatureEvidenceComparator
-
- All Implemented Interfaces:
Comparator<FeatureEvidence>
public class UnambiguousFeatureEvidenceComparator extends FeatureEvidenceComparator
Unambiguous FeatureEvidence comparator. It will first compare feature detection methods using UnambiguousCvTermComparator. If both feature detection methods are the same, it will use a UnambiguousFeatureBaseComparator 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)
-
-
Field Summary
Fields Modifier and Type Field Description protected ParameterCollectionComparator
parameterCollectionComparator
-
Constructor Summary
Constructors Constructor Description UnambiguousFeatureEvidenceComparator()
Creates a new UnambiguousFeatureEvidenceComparator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
areEquals(FeatureEvidence feature1, FeatureEvidence feature2)
Use UnambiguousFeatureEvidenceComparator to know if two experimental features are equals.int
compare(FeatureEvidence experimentalFeature1, FeatureEvidence experimentalFeature2)
It will first compare feature detection methods using UnambiguousCvTermComparator.UnambiguousFeatureBaseComparator
getFeatureComparator()
Getter for the fieldfeatureComparator
.ParameterCollectionComparator
getParameterCollectionComparator()
-
Methods inherited from class psidev.psi.mi.jami.utils.comparator.feature.FeatureEvidenceComparator
getCvTermCollectionComparators
-
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
-
-
-
-
Field Detail
-
parameterCollectionComparator
protected ParameterCollectionComparator parameterCollectionComparator
-
-
Constructor Detail
-
UnambiguousFeatureEvidenceComparator
public UnambiguousFeatureEvidenceComparator()
Creates a new UnambiguousFeatureEvidenceComparator. It will use a UnambiguousCvTermComparator to compare feature detection methods and a UnambiguousFeatureBaseComparator to compare basic feature properties
-
-
Method Detail
-
getFeatureComparator
public UnambiguousFeatureBaseComparator getFeatureComparator()
Getter for the field
featureComparator
.- Overrides:
getFeatureComparator
in classFeatureEvidenceComparator
- Returns:
- a
Comparator
object.
-
getParameterCollectionComparator
public ParameterCollectionComparator getParameterCollectionComparator()
-
compare
public int compare(FeatureEvidence experimentalFeature1, FeatureEvidence experimentalFeature2)
It will first compare feature detection methods using UnambiguousCvTermComparator. If both feature detection methods are the same, it will use a UnambiguousFeatureBaseComparator to compare basic properties of a feature. This comparator will ignore all the other properties of an experimental feature.- Specified by:
compare
in interfaceComparator<FeatureEvidence>
- Overrides:
compare
in classFeatureEvidenceComparator
- Parameters:
experimentalFeature1
- aFeatureEvidence
object.experimentalFeature2
- aFeatureEvidence
object.- Returns:
- a int.
-
areEquals
public static boolean areEquals(FeatureEvidence feature1, FeatureEvidence feature2)
Use UnambiguousFeatureEvidenceComparator to know if two experimental features are equals.- Parameters:
feature1
- aFeatureEvidence
object.feature2
- aFeatureEvidence
object.- Returns:
- true if the two experimental features are equal
-
-