Class CvTermNameComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.cv.CvTermNameComparator
-
- All Implemented Interfaces:
Comparator<CvTerm>
public class CvTermNameComparator extends Object implements Comparator<CvTerm>
Comparator for CvTerms that only takes into consideration the shortName of ths cv term- Since:
18/12/12
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description CvTermNameComparator()
Creates a new CvTermComparator with UnambiguousExternalIdentifierComparator
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
areEquals(CvTerm cv1, CvTerm cv2)
Use UnambiguousCvTermComparator to know if two CvTerms are equals.int
compare(CvTerm cvTerm1, CvTerm cvTerm2)
Only compares the shortname of two cv terms.static int
hashCode(CvTerm cv1)
hashCode-
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
-
-
-
-
Method Detail
-
compare
public int compare(CvTerm cvTerm1, CvTerm cvTerm2)
Only compares the shortname of two cv terms. The comparison is case insensitive- Specified by:
compare
in interfaceComparator<CvTerm>
- Parameters:
cvTerm1
- aCvTerm
object.cvTerm2
- aCvTerm
object.- Returns:
- a int.
-
areEquals
public static boolean areEquals(CvTerm cv1, CvTerm cv2)
Use UnambiguousCvTermComparator to know if two CvTerms are equals.
-
-