From: gmungoc Date: Fri, 16 Dec 2016 09:45:09 +0000 (+0000) Subject: JAL-1705 JAL-98 use SortedMap as more accurate type than Map X-Git-Tag: Release_2_10_3b1~357^2~51 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=9390152fd31fd0d9c52833f1e5c63d222cb38d82;p=jalview.git JAL-1705 JAL-98 use SortedMap as more accurate type than Map --- diff --git a/src/jalview/analysis/AlignmentUtils.java b/src/jalview/analysis/AlignmentUtils.java index 34fe221..ea96b3b 100644 --- a/src/jalview/analysis/AlignmentUtils.java +++ b/src/jalview/analysis/AlignmentUtils.java @@ -60,6 +60,7 @@ import java.util.Map; import java.util.Map.Entry; import java.util.NoSuchElementException; import java.util.Set; +import java.util.SortedMap; import java.util.TreeMap; /** @@ -2840,7 +2841,7 @@ public class AlignmentUtils * @param unmapped * @return */ - static Map> buildMappedColumnsMap( + static SortedMap> buildMappedColumnsMap( AlignmentI unaligned, AlignmentI aligned, List unmapped) { /* @@ -2848,7 +2849,7 @@ public class AlignmentUtils * {unalignedSequence, characterPerSequence} at that position. * TreeMap keeps the entries in ascending column order. */ - Map> map = new TreeMap>(); + SortedMap> map = new TreeMap>(); /* * record any sequences that have no mapping so can't be realigned diff --git a/src/jalview/analysis/Conservation.java b/src/jalview/analysis/Conservation.java index 7b9da46..5e5f716 100755 --- a/src/jalview/analysis/Conservation.java +++ b/src/jalview/analysis/Conservation.java @@ -33,6 +33,7 @@ import java.awt.Color; import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.SortedMap; import java.util.TreeMap; import java.util.Vector; @@ -243,7 +244,7 @@ public class Conservation * or not conserved (-1) * Using TreeMap means properties are displayed in alphabetical order */ - Map resultHash = new TreeMap(); + SortedMap resultHash = new TreeMap(); SymbolCounts symbolCounts = values.getSymbolCounts(); char[] symbols = symbolCounts.symbols; int[] counts = symbolCounts.values;