Class UnambiguousVariableParameterComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.experiment.VariableParameterComparator
-
- psidev.psi.mi.jami.utils.comparator.experiment.UnambiguousVariableParameterComparator
-
- All Implemented Interfaces:
Comparator<VariableParameter>
public class UnambiguousVariableParameterComparator extends VariableParameterComparator
Unambiguous VariableParameter comparator It will first compare the description (case insensitive). Then it will compare the unit using UnambiguousCvTermComparator. Then it will compare the collection of VariableParameterValue using the VariableParameterValueComparator.- Since:
22/05/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description UnambiguousVariableParameterComparator()Constructor for UnambiguousVariableParameterComparator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanareEquals(VariableParameter param1, VariableParameter param2)Use UnambiguousVariableParameterComparator to know if two variableParameter are equals.intcompare(VariableParameter param1, VariableParameter param2)It will first compare the description (case insensitive).UnambiguousCvTermComparatorgetCvTermComparator()Getter for the fieldcvTermComparator.static inthashCode(VariableParameter param)hashCode-
Methods inherited from class psidev.psi.mi.jami.utils.comparator.experiment.VariableParameterComparator
getVariableParameterValueCollectionComparator
-
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(VariableParameter param1, VariableParameter param2)
It will first compare the description (case insensitive). Then it will compare the unit using AbstractCvTermComparator. Then it will compare the collection of VariableParameterValue using the VariableParameterValueComparator. It will first compare the description (case insensitive). Then it will compare the unit using DefaultCvTermComparator. Then it will compare the collection of VariableParameterValue using the VariableParameterValueComparator.- Specified by:
comparein interfaceComparator<VariableParameter>- Overrides:
comparein classVariableParameterComparator- Parameters:
param1- aVariableParameterobject.param2- aVariableParameterobject.- Returns:
- a int.
-
getCvTermComparator
public UnambiguousCvTermComparator getCvTermComparator()
Getter for the field
cvTermComparator.- Overrides:
getCvTermComparatorin classVariableParameterComparator- Returns:
- a
Comparatorobject.
-
areEquals
public static boolean areEquals(VariableParameter param1, VariableParameter param2)
Use UnambiguousVariableParameterComparator to know if two variableParameter are equals.- Parameters:
param1- aVariableParameterobject.param2- aVariableParameterobject.- Returns:
- true if the two variableParameters are equal
-
hashCode
public static int hashCode(VariableParameter param)
hashCode
- Parameters:
param- aVariableParameterobject.- Returns:
- the hashcode consistent with the equals method for this comparator
-
-