Class InteractorBaseComparator

  • All Implemented Interfaces:
    Comparator<Interactor>
    Direct Known Subclasses:
    UnambiguousInteractorBaseComparator

    public class InteractorBaseComparator
    extends Object
    implements Comparator<Interactor>
    nteractor comparator It will only compare identifiers if one interactor does have identifiers using UnambiguousIdentifierComparator. Otherwise, it will first compare shortNames (case sensitive) fullnames(case sensitive) and if the shortNames and fullnames are the same, it will compare the aliases using UnambiguousAliasComparator. This comparator will ignore all the other properties of an interactor.
    Since:
    21/12/12
    Version:
    $Id$
    Author:
    Marine Dumousseau (marine@ebi.ac.uk)
    • Method Detail

      • getIdentifierComparator

        public Comparator<Xref> getIdentifierComparator()

        Getter for the field identifierComparator.

        Returns:
        a Comparator object.
      • getAliasComparator

        public Comparator<Alias> getAliasComparator()

        Getter for the field aliasComparator.

        Returns:
        a Comparator object.
      • compare

        public int compare​(Interactor interactor1,
                           Interactor interactor2)
        It will only compare identifiers if one interactor does have identifiers using UnambiguousIdentifierComparator. Otherwise, it will first compare shortNames (case sensitive) fullnames(case sensitive) and if the shortNames and fullnames are the same, it will compare the aliases using UnambiguousAliasComparator. This comparator will ignore all the other properties of an interactor.
        Specified by:
        compare in interface Comparator<Interactor>
        Parameters:
        interactor1 - a Interactor object.
        interactor2 - a Interactor object.
        Returns:
        a int.