git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4316d20
)
JAL-2114 corrected Javadoc
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Thu, 9 Jun 2016 13:46:35 +0000
(14:46 +0100)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Thu, 9 Jun 2016 13:46:35 +0000
(14:46 +0100)
src/jalview/util/DnaUtils.java
patch
|
blob
|
history
diff --git
a/src/jalview/util/DnaUtils.java
b/src/jalview/util/DnaUtils.java
index
f6514e5
..
9ab4fda
100644
(file)
--- a/
src/jalview/util/DnaUtils.java
+++ b/
src/jalview/util/DnaUtils.java
@@
-35,15
+35,14
@@
public class DnaUtils
/*
* try to parse m..n (or simply m)
/*
* try to parse m..n (or simply m)
- * also handles <m..n or m..>n (discarding < or >)
*/
String[] range = location.split("\\.\\.");
if (range.length == 1 || range.length == 2)
{
try
{
*/
String[] range = location.split("\\.\\.");
if (range.length == 1 || range.length == 2)
{
try
{
- int start = parseRangeEnd(range[0]);
- int end = range.length == 1 ? start : parseRangeEnd(range[1]);
+ int start = Integer.valueOf(range[0]);
+ int end = range.length == 1 ? start : Integer.valueOf(range[1]);
return Collections.singletonList(new int[] { start, end });
} catch (NumberFormatException e)
{
return Collections.singletonList(new int[] { start, end });
} catch (NumberFormatException e)
{
@@
-65,22
+64,6
@@
public class DnaUtils
}
/**
}
/**
- * Returns the integer value of a locus, discarding any < or > prefix
- *
- * @throws NumberFormatException
- * if value is not numeric
- */
- static int parseRangeEnd(String loc)
- {
-
- if (loc.startsWith("<") || loc.startsWith(">"))
- {
- loc = loc.substring(1);
- }
- return Integer.valueOf(loc);
- }
-
- /**
* Parses a complement(locationSpec) into a list of start-end ranges
*
* @param location
* Parses a complement(locationSpec) into a list of start-end ranges
*
* @param location