Class ResultingSequenceComparator
- java.lang.Object
-
- psidev.psi.mi.jami.utils.comparator.range.ResultingSequenceComparator
-
- All Implemented Interfaces:
Comparator<ResultingSequence>
public class ResultingSequenceComparator extends Object implements Comparator<ResultingSequence>
Simple resultingSequence comparator It will first compare the original sequence and then if the original sequences are the same, it will compare the new sequences (case insensitive).- Since:
21/05/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Constructor Summary
Constructors Constructor Description ResultingSequenceComparator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
areEquals(ResultingSequence resultingSequence1, ResultingSequence resultingSequence2)
Use ResultingSequenceComparator to know if two resulting sequences are equals.int
compare(ResultingSequence resultingSequence1, ResultingSequence resultingSequence2)
It will first compare the original sequence and then if the original sequences are the same, it will compare the new sequences.static int
hashCode(ResultingSequence resultingSequence)
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(ResultingSequence resultingSequence1, ResultingSequence resultingSequence2)
It will first compare the original sequence and then if the original sequences are the same, it will compare the new sequences.- Specified by:
compare
in interfaceComparator<ResultingSequence>
- Parameters:
resultingSequence1
- aResultingSequence
object.resultingSequence2
- aResultingSequence
object.- Returns:
- a int.
-
areEquals
public static boolean areEquals(ResultingSequence resultingSequence1, ResultingSequence resultingSequence2)
Use ResultingSequenceComparator to know if two resulting sequences are equals.- Parameters:
resultingSequence1
- aResultingSequence
object.resultingSequence2
- aResultingSequence
object.- Returns:
- true if the two resulting sequences are equal
-
hashCode
public static int hashCode(ResultingSequence resultingSequence)
hashCode
- Parameters:
resultingSequence
- aResultingSequence
object.- Returns:
- the hashcode consistent with the equals method for this comparator
-
-