Class FeatureComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.feature.FeatureComparator
-
- All Implemented Interfaces:
Comparator<Feature>
- Direct Known Subclasses:
UnambiguousFeatureComparator
public class FeatureComparator extends Object implements Comparator<Feature>
Generic feature comparator. Entity features come first, then Biological features come first and then experimental features. - It uses ModelledFeatureComparator to compare biological features - It uses FeatureEvidenceComparator to compare experimental features - It uses AbstractFeatureBaseComparator to compare basic feature properties- Since:
04/02/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description FeatureComparator(Comparator<Feature> featureBaseComparator, Comparator<CvTerm> cvTermComparator)
Constructor for FeatureComparator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Feature feature1, Feature feature2)
Biological features come first and then experimental features.ModelledFeatureComparator
getBiologicalFeatureComparator()
Getter for the fieldbiologicalFeatureComparator
.FeatureEvidenceComparator
getExperimentalFeatureComparator()
Getter for the fieldexperimentalFeatureComparator
.Comparator<Feature>
getFeatureBaseComparator()
Getter for the fieldfeatureBaseComparator
.-
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
-
FeatureComparator
public FeatureComparator(Comparator<Feature> featureBaseComparator, Comparator<CvTerm> cvTermComparator)
Constructor for FeatureComparator.
- Parameters:
featureBaseComparator
- aComparator
object.cvTermComparator
- aComparator
object.
-
-
Method Detail
-
getBiologicalFeatureComparator
public ModelledFeatureComparator getBiologicalFeatureComparator()
Getter for the field
biologicalFeatureComparator
.- Returns:
- a
ModelledFeatureComparator
object.
-
getExperimentalFeatureComparator
public FeatureEvidenceComparator getExperimentalFeatureComparator()
Getter for the field
experimentalFeatureComparator
.- Returns:
- a
FeatureEvidenceComparator
object.
-
getFeatureBaseComparator
public Comparator<Feature> getFeatureBaseComparator()
Getter for the field
featureBaseComparator
.- Returns:
- a
Comparator
object.
-
compare
public int compare(Feature feature1, Feature feature2)
Biological features come first and then experimental features. - It uses ModelledFeatureComparator to compare biological features - It uses FeatureEvidenceComparator to compare experimental features - It uses AbstractFeatureBaseComparator to compare basic feature properties- Specified by:
compare
in interfaceComparator<Feature>
- Parameters:
feature1
- aFeature
object.feature2
- aFeature
object.- Returns:
- a int.
-
-