Class VariableParameterValueComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.experiment.VariableParameterValueComparator
-
- All Implemented Interfaces:
Comparator<VariableParameterValue>
public class VariableParameterValueComparator extends Object implements Comparator<VariableParameterValue>
Simple Comparator for VariableParameterValue It will first compare the value (case insensitive) and then the order. It ignores the variableParameter- Since:
22/05/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description VariableParameterValueComparator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
areEquals(VariableParameterValue parameterValue1, VariableParameterValue parameterValue2)
Use VariableParameterValueComparator to know if two variableParameterValues are equals.int
compare(VariableParameterValue variableParameterValue1, VariableParameterValue variableParameterValue2)
It will first compare the value (case insensitive) and then the order.static int
hashCode(VariableParameterValue value)
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(VariableParameterValue variableParameterValue1, VariableParameterValue variableParameterValue2)
It will first compare the value (case insensitive) and then the order. It ignores the variableParameter- Specified by:
compare
in interfaceComparator<VariableParameterValue>
- Parameters:
variableParameterValue1
- aVariableParameterValue
object.variableParameterValue2
- aVariableParameterValue
object.- Returns:
- a int.
-
areEquals
public static boolean areEquals(VariableParameterValue parameterValue1, VariableParameterValue parameterValue2)
Use VariableParameterValueComparator to know if two variableParameterValues are equals.- Parameters:
parameterValue1
- aVariableParameterValue
object.parameterValue2
- aVariableParameterValue
object.- Returns:
- true if the two variableParameterValues are equal
-
hashCode
public static int hashCode(VariableParameterValue value)
hashCode
- Parameters:
value
- aVariableParameterValue
object.- Returns:
- the hashcode consistent with the equals method for this comparator
-
-