X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FMapping.java;h=1272538fb41432cf9599a93b22a09f9b81f9e7fd;hb=4d7f98a6dd54d9863ba449ec79dcd95d25ed863d;hp=d7b7eb98ff38fa565070834efbbaec448b8d2075;hpb=d66775feacb4a7cc43c5296e8ef33811e5e75e79;p=jalview.git diff --git a/src/jalview/datamodel/Mapping.java b/src/jalview/datamodel/Mapping.java index d7b7eb9..1272538 100644 --- a/src/jalview/datamodel/Mapping.java +++ b/src/jalview/datamodel/Mapping.java @@ -20,12 +20,12 @@ */ package jalview.datamodel; +import jalview.util.MapList; + import java.util.Iterator; import java.util.NoSuchElementException; import java.util.Vector; -import jalview.util.MapList; - public class Mapping { /** @@ -163,7 +163,8 @@ public class Mapping { // TODO should ideally handle toRatio other than 1 as well... // i.e. code like getNextCodon() - if (toPosition <= currentToRange[1]) { + if (toPosition <= currentToRange[1]) + { char pep = Mapping.this.to.getSequence()[toPosition - 1]; toPosition++; return String.valueOf(pep); @@ -466,8 +467,7 @@ public class Mapping int[] mp = map.shiftFrom(pos); if (mp != null) { - return new int[] - { mp[0], mp[0] + mp[2] * (map.getToRatio() - 1) }; + return new int[] { mp[0], mp[0] + mp[2] * (map.getToRatio() - 1) }; } } return null; @@ -528,8 +528,7 @@ public class Mapping } } // give up and just return the feature. - return new SequenceFeature[] - { f }; + return new SequenceFeature[] { f }; } /** @@ -565,8 +564,7 @@ public class Mapping } return map.locateInFrom(from, to); } - return new int[] - { from, to }; + return new int[] { from, to }; } /** @@ -602,8 +600,7 @@ public class Mapping } return map.locateInTo(from, to); } - return new int[] - { from, to }; + return new int[] { from, to }; } /** @@ -631,13 +628,11 @@ public class Mapping { for (int m = 0; m < mpr.length; m += 2) { - toRange.addElement(new int[] - { mpr[m], mpr[m + 1] }); + toRange.addElement(new int[] { mpr[m], mpr[m + 1] }); int[] xpos = locateRange(mpr[m], mpr[m + 1]); for (int x = 0; x < xpos.length; x += 2) { - fromRange.addElement(new int[] - { xpos[x], xpos[x + 1] }); + fromRange.addElement(new int[] { xpos[x], xpos[x + 1] }); } } }