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 booleanareEquals(VariableParameterValue parameterValue1, VariableParameterValue parameterValue2)Use VariableParameterValueComparator to know if two variableParameterValues are equals.intcompare(VariableParameterValue variableParameterValue1, VariableParameterValue variableParameterValue2)It will first compare the value (case insensitive) and then the order.static inthashCode(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:
comparein interfaceComparator<VariableParameterValue>- Parameters:
variableParameterValue1- aVariableParameterValueobject.variableParameterValue2- aVariableParameterValueobject.- Returns:
- a int.
-
areEquals
public static boolean areEquals(VariableParameterValue parameterValue1, VariableParameterValue parameterValue2)
Use VariableParameterValueComparator to know if two variableParameterValues are equals.- Parameters:
parameterValue1- aVariableParameterValueobject.parameterValue2- aVariableParameterValueobject.- Returns:
- true if the two variableParameterValues are equal
-
hashCode
public static int hashCode(VariableParameterValue value)
hashCode
- Parameters:
value- aVariableParameterValueobject.- Returns:
- the hashcode consistent with the equals method for this comparator
-
-