git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-2418 source formatting
[jalview.git]
/
src
/
jalview
/
analysis
/
Rna.java
diff --git
a/src/jalview/analysis/Rna.java
b/src/jalview/analysis/Rna.java
index
7c07708
..
94544e7
100644
(file)
--- a/
src/jalview/analysis/Rna.java
+++ b/
src/jalview/analysis/Rna.java
@@
-48,7
+48,8
@@
public class Rna
*/
public static boolean isOpeningParenthesis(char c)
{
*/
public static boolean isOpeningParenthesis(char c)
{
- return ('A' <= c && c <= 'Z' || c == '(' || c == '[' || c == '{' || c == '<');
+ return ('A' <= c && c <= 'Z' || c == '(' || c == '[' || c == '{'
+ || c == '<');
}
/**
}
/**
@@
-73,7
+74,8
@@
public class Rna
*/
public static boolean isClosingParenthesis(char c)
{
*/
public static boolean isClosingParenthesis(char c)
{
- return ('a' <= c && c <= 'z' || c == ')' || c == ']' || c == '}' || c == '>');
+ return ('a' <= c && c <= 'z' || c == ')' || c == ']' || c == '}'
+ || c == '>');
}
/**
}
/**
@@
-159,8
+161,8
@@
public class Rna
if (!stacks.containsKey(opening))
{
throw new WUSSParseException(MessageManager.formatMessage(
if (!stacks.containsKey(opening))
{
throw new WUSSParseException(MessageManager.formatMessage(
- "exception.mismatched_unseen_closing_char",
- new String[] { String.valueOf(base) }), i);
+ "exception.mismatched_unseen_closing_char", new String[]
+ { String.valueOf(base) }), i);
}
Stack<Integer> stack = stacks.get(opening);
}
Stack<Integer> stack = stacks.get(opening);
@@
-168,8
+170,8
@@
public class Rna
{
// error whilst parsing i'th position. pass back
throw new WUSSParseException(MessageManager.formatMessage(
{
// error whilst parsing i'th position. pass back
throw new WUSSParseException(MessageManager.formatMessage(
- "exception.mismatched_closing_char",
- new String[] { String.valueOf(base) }), i);
+ "exception.mismatched_closing_char", new String[]
+ { String.valueOf(base) }), i);
}
int temp = stack.pop();
}
int temp = stack.pop();
@@
-187,9
+189,9
@@
public class Rna
* i (length of input string)
*/
throw new WUSSParseException(MessageManager.formatMessage(
* i (length of input string)
*/
throw new WUSSParseException(MessageManager.formatMessage(
- "exception.mismatched_opening_char",
- new String[] { String.valueOf(opening),
- String.valueOf(stack.pop()) }), i);
+ "exception.mismatched_opening_char", new String[]
+ { String.valueOf(opening), String.valueOf(stack.pop()) }),
+ i);
}
}
return pairs;
}
}
return pairs;
@@
-359,8
+361,8
@@
public class Rna
}
/**
}
/**
- * Answers true if the base-pair is either a canonical (A-T/U, C-G) or a
- * wobble (G-T/U) pair (either way round), else false
+ * Answers true if the base-pair is either a Watson-Crick (A:T/U, C:G) or a
+ * wobble (G:T/U) pair (either way round), else false
*
* @param first
* @param second
*
* @param first
* @param second
@@
-376,7
+378,7
@@
public class Rna
{
second -= 32;
}
{
second -= 32;
}
-
+
switch (first)
{
case 'A':
switch (first)
{
case 'A':
@@
-416,6
+418,14
@@
public class Rna
return false;
}
return false;
}
+ /**
+ * Answers true if the base-pair is Watson-Crick - (A:T/U or C:G, either way
+ * round), else false
+ *
+ * @param first
+ * @param second
+ * @return
+ */
public static boolean isCanonicalPair(char first, char second)
{
public static boolean isCanonicalPair(char first, char second)
{