Class 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 Detail

    • Method Detail

      • 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 interface Comparator<Feature>
        Parameters:
        feature1 - a Feature object.
        feature2 - a Feature object.
        Returns:
        a int.