*/
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
{
/**
{
// 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);
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;
}
}
// give up and just return the feature.
- return new SequenceFeature[]
- { f };
+ return new SequenceFeature[] { f };
}
/**
}
return map.locateInFrom(from, to);
}
- return new int[]
- { from, to };
+ return new int[] { from, to };
}
/**
}
return map.locateInTo(from, to);
}
- return new int[]
- { from, to };
+ return new int[] { from, to };
}
/**
{
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] });
}
}
}