@ Override public int compare ( CDSSequence o1 , CDSSequence o2 ) { if ( o1 . getStrand ( ) != o2 . getStrand ( ) ) { return o1 . getBioBegin ( ) - o2 . getBioBegin ( ) ; } if ( o1 . getStrand ( ) == Strand . NEGATIVE ) { return - 1 * ( o1 . getBioBegin ( ) - o2 . getBioBegin ( ) ) ; } return o1 . getBioBegin ( ) - o2 . getBioBegin ( ) ; }
Used to sort two CDSSequences where Negative Strand makes it tough