X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FRna.java;h=e752126af159fc80265ea8e2cc06eb2010da46a0;hb=4d7f98a6dd54d9863ba449ec79dcd95d25ed863d;hp=227bf09f76d088b799b7704c44d051565e32655b;hpb=0d99573a880dde31be87debed52ef20b9481f921;p=jalview.git diff --git a/src/jalview/analysis/Rna.java b/src/jalview/analysis/Rna.java index 227bf09..e752126 100644 --- a/src/jalview/analysis/Rna.java +++ b/src/jalview/analysis/Rna.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -42,15 +42,13 @@ public class Rna static Hashtable pairHash = new Hashtable(); - private static final Character[] openingPars = - { '(', '[', '{', '<', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', - 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', - 'Y', 'Z' }; + private static final Character[] openingPars = { '(', '[', '{', '<', 'A', + 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' }; - private static final Character[] closingPars = - { ')', ']', '}', '>', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', - 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', - 'y', 'z' }; + private static final Character[] closingPars = { ')', ']', '}', '>', 'a', + 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', + 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' }; private static HashSet openingParsSet = new HashSet( Arrays.asList(openingPars)); @@ -86,7 +84,11 @@ public class Rna { if (!isClosingParenthesis(closingParenthesis)) { - throw new WUSSParseException(MessageManager.formatMessage("exception.querying_matching_opening_parenthesis_for_non_closing_parenthesis", new String[]{new StringBuffer(closingParenthesis).toString()}), -1); + throw new WUSSParseException( + MessageManager.formatMessage( + "exception.querying_matching_opening_parenthesis_for_non_closing_parenthesis", + new String[] { new StringBuffer(closingParenthesis) + .toString() }), -1); } return closingToOpening.get(closingParenthesis); @@ -130,14 +132,18 @@ public class Rna if (!stacks.containsKey(opening)) { - throw new WUSSParseException(MessageManager.formatMessage("exception.mismatched_unseen_closing_char", new String[]{new StringBuffer(base).toString()}), i); + throw new WUSSParseException(MessageManager.formatMessage( + "exception.mismatched_unseen_closing_char", + new String[] { new StringBuffer(base).toString() }), i); } Stack stack = stacks.get(opening); if (stack.isEmpty()) { // error whilst parsing i'th position. pass back - throw new WUSSParseException(MessageManager.formatMessage("exception.mismatched_closing_char", new String[]{new StringBuffer(base).toString()}), i); + throw new WUSSParseException(MessageManager.formatMessage( + "exception.mismatched_closing_char", + new String[] { new StringBuffer(base).toString() }), i); } int temp = stack.pop(); @@ -150,7 +156,10 @@ public class Rna Stack stack = stacks.get(opening); if (!stack.empty()) { - throw new WUSSParseException(MessageManager.formatMessage("exception.mismatched_opening_char", new String[]{new StringBuffer(opening).toString(),Integer.valueOf(stack.pop()).toString()}), i); + throw new WUSSParseException(MessageManager.formatMessage( + "exception.mismatched_opening_char", + new String[] { new StringBuffer(opening).toString(), + Integer.valueOf(stack.pop()).toString() }), i); } } return pairs;