Class NucleicAcidComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.interactor.NucleicAcidComparator
-
- All Implemented Interfaces:
Comparator<NucleicAcid>
- Direct Known Subclasses:
UnambiguousExactNucleicAcidComparator
,UnambiguousNucleicAcidComparator
public class NucleicAcidComparator extends Object implements Comparator<NucleicAcid>
Unambiguous nucleic acids comparator. It will first use UnambiguousPolymerComparator to compare the basic interactor properties. If the basic polymer properties are the same, It will look for DDBJ/EMBL/Genbank identifier. If the DDBJ/EMBL/Genbank identifiers are identical, it will look at the Refseq identifiers.- Since:
15/01/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description NucleicAcidComparator(PolymerComparator polymerComparator)
Creates a new UnambiguousNucleicAcidComparator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(NucleicAcid nucleicAcid1, NucleicAcid nucleicAcid2)
It will first use UnambiguousPolymerComparator to compare the basic interactor properties.PolymerComparator
getInteractorComparator()
Getter for the fieldinteractorComparator
.-
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
-
NucleicAcidComparator
public NucleicAcidComparator(PolymerComparator polymerComparator)
Creates a new UnambiguousNucleicAcidComparator. It will uses a UnambiguousInteractorBaseComparator to compare interactor properties and a OrganismTaxIdComparator to compares organism.- Parameters:
polymerComparator
- aPolymerComparator
object.
-
-
Method Detail
-
compare
public int compare(NucleicAcid nucleicAcid1, NucleicAcid nucleicAcid2)
It will first use UnambiguousPolymerComparator to compare the basic interactor properties. If the basic polymer properties are the same, It will look for DDBJ/EMBL/Genbank identifier. If the DDBJ/EMBL/Genbank identifiers are identical, it will look at the Refseq identifiers.- Specified by:
compare
in interfaceComparator<NucleicAcid>
- Parameters:
nucleicAcid1
- aNucleicAcid
object.nucleicAcid2
- aNucleicAcid
object.- Returns:
- a int.
-
getInteractorComparator
public PolymerComparator getInteractorComparator()
Getter for the field
interactorComparator
.- Returns:
- a
PolymerComparator
object.
-
-