Class VariableParameterComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.experiment.VariableParameterComparator
-
- All Implemented Interfaces:
Comparator<VariableParameter>
- Direct Known Subclasses:
UnambiguousVariableParameterComparator
public class VariableParameterComparator extends Object implements Comparator<VariableParameter>
Basic comparator for VariableParameterComparator 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.- Since:
22/05/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description VariableParameterComparator(Comparator<CvTerm> cvTermComparator)
Constructor for VariableParameterComparator.VariableParameterComparator(Comparator<CvTerm> cvTermComparator, CollectionComparator<VariableParameterValue> variablecomparator)
Constructor for VariableParameterComparator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(VariableParameter variableParameter1, VariableParameter variableParameter2)
It will first compare the description (case insensitive).Comparator<CvTerm>
getCvTermComparator()
Getter for the fieldcvTermComparator
.CollectionComparator<VariableParameterValue>
getVariableParameterValueCollectionComparator()
Getter for the fieldvariableParameterValueCollectionComparator
.-
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
-
-
-
-
Constructor Detail
-
VariableParameterComparator
public VariableParameterComparator(Comparator<CvTerm> cvTermComparator)
Constructor for VariableParameterComparator.
- Parameters:
cvTermComparator
- aComparator
object.
-
VariableParameterComparator
public VariableParameterComparator(Comparator<CvTerm> cvTermComparator, CollectionComparator<VariableParameterValue> variablecomparator)
Constructor for VariableParameterComparator.
- Parameters:
cvTermComparator
- aComparator
object.variablecomparator
- aCollectionComparator
object.
-
-
Method Detail
-
getCvTermComparator
public Comparator<CvTerm> getCvTermComparator()
Getter for the field
cvTermComparator
.- Returns:
- a
Comparator
object.
-
getVariableParameterValueCollectionComparator
public CollectionComparator<VariableParameterValue> getVariableParameterValueCollectionComparator()
Getter for the field
variableParameterValueCollectionComparator
.- Returns:
- a
CollectionComparator
object.
-
compare
public int compare(VariableParameter variableParameter1, VariableParameter variableParameter2)
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.- Specified by:
compare
in interfaceComparator<VariableParameter>
- Parameters:
variableParameter1
- aVariableParameter
object.variableParameter2
- aVariableParameter
object.- Returns:
- a int.
-
-