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 boolean
areEquals(VariableParameter param1, VariableParameter param2)
Use UnambiguousVariableParameterComparator to know if two variableParameter are equals.int
compare(VariableParameter param1, VariableParameter param2)
It will first compare the description (case insensitive).UnambiguousCvTermComparator
getCvTermComparator()
Getter for the fieldcvTermComparator
.static int
hashCode(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:
compare
in interfaceComparator<VariableParameter>
- Overrides:
compare
in classVariableParameterComparator
- Parameters:
param1
- aVariableParameter
object.param2
- aVariableParameter
object.- Returns:
- a int.
-
getCvTermComparator
public UnambiguousCvTermComparator getCvTermComparator()
Getter for the field
cvTermComparator
.- Overrides:
getCvTermComparator
in classVariableParameterComparator
- Returns:
- a
Comparator
object.
-
areEquals
public static boolean areEquals(VariableParameter param1, VariableParameter param2)
Use UnambiguousVariableParameterComparator to know if two variableParameter are equals.- Parameters:
param1
- aVariableParameter
object.param2
- aVariableParameter
object.- Returns:
- true if the two variableParameters are equal
-
hashCode
public static int hashCode(VariableParameter param)
hashCode
- Parameters:
param
- aVariableParameter
object.- Returns:
- the hashcode consistent with the equals method for this comparator
-
-