JAL-3438 spotless for 2.11.2.0
[jalview.git] / src / com / stevesoft / pat / Regex.java
index 6d07427..fea3d07 100755 (executable)
@@ -87,7 +87,8 @@ class NUnicodeW extends UniValidator
       return -1;
     }
     char c = s.charAt(from);
-    return !(Prop.isAlphabetic(c) || Prop.isDecimalDigit(c) || c == '_') ? to
+    return !(Prop.isAlphabetic(c) || Prop.isDecimalDigit(c) || c == '_')
+            ? to
             : -1;
   }
 }
@@ -282,8 +283,8 @@ class UnicodeLower extends UniValidator
  * small differences as well. I will either make my package conform or note them
  * as I become aware of them.
  * <p>
- * This package supports additional patterns not in perl5: <center>
- * <table * border=1>
+ * This package supports additional patterns not in perl5: <center> <table *
+ * border=1>
  * <tr>
  * <td>(?@())</td>
  * <td>Group</td>
@@ -298,7 +299,8 @@ class UnicodeLower extends UniValidator
  * beginning of the string. "x(?&lt1)" is equivalent to "(?=x)". The number, 1
  * in this example, is the number of characters to move backwards.</td>
  * </table>
- * </center> </dl>
+ * </center>
+ * </dl>
  * 
  * @author Steven R. Brandt
  * @version package com.stevesoft.pat, release 1.5.3
@@ -736,7 +738,8 @@ public class Regex extends RegRes implements FilenameFilter
     {
       pt.lastPos = 0;
     }
-    if ((s == null ? null : s.unwrap()) != (src == null ? null : s.unwrap()))
+    if ((s == null ? null : s.unwrap()) != (src == null ? null
+            : s.unwrap()))
     {
       pt.lastPos = 0;
     }
@@ -798,9 +801,8 @@ public class Regex extends RegRes implements FilenameFilter
   {
     if (s == null)
     {
-      throw new NullPointerException(
-              MessageManager
-                      .getString("exception.null_string_given_to_regex_search"));
+      throw new NullPointerException(MessageManager
+              .getString("exception.null_string_given_to_regex_search"));
     }
     return _search(s, 0, s.length());
   }
@@ -809,9 +811,8 @@ public class Regex extends RegRes implements FilenameFilter
   {
     if (sl == null)
     {
-      throw new NullPointerException(
-              MessageManager
-                      .getString("exception.null_string_like_given_to_regex_search"));
+      throw new NullPointerException(MessageManager.getString(
+              "exception.null_string_like_given_to_regex_search"));
     }
     return _search(sl, 0, sl.length());
   }
@@ -820,9 +821,8 @@ public class Regex extends RegRes implements FilenameFilter
   {
     if (s == null)
     {
-      throw new NullPointerException(
-              MessageManager
-                      .getString("exception.null_string_given_to_regex_reverse_search"));
+      throw new NullPointerException(MessageManager.getString(
+              "exception.null_string_given_to_regex_reverse_search"));
     }
     return _reverseSearch(s, 0, s.length());
   }
@@ -831,9 +831,8 @@ public class Regex extends RegRes implements FilenameFilter
   {
     if (sl == null)
     {
-      throw new NullPointerException(
-              MessageManager
-                      .getString("exception.null_string_like_given_to_regex_reverse_search"));
+      throw new NullPointerException(MessageManager.getString(
+              "exception.null_string_like_given_to_regex_reverse_search"));
     }
     return _reverseSearch(sl, 0, sl.length());
   }
@@ -850,9 +849,8 @@ public class Regex extends RegRes implements FilenameFilter
   {
     if (s == null)
     {
-      throw new NullPointerException(
-              MessageManager
-                      .getString("exception.null_string_like_given_to_regex_search_from"));
+      throw new NullPointerException(MessageManager.getString(
+              "exception.null_string_like_given_to_regex_search_from"));
     }
     return _search(s, start, s.length());
   }
@@ -861,9 +859,8 @@ public class Regex extends RegRes implements FilenameFilter
   {
     if (s == null)
     {
-      throw new NullPointerException(
-              MessageManager
-                      .getString("exception.null_string_like_given_to_regex_search_from"));
+      throw new NullPointerException(MessageManager.getString(
+              "exception.null_string_like_given_to_regex_search_from"));
     }
     return _search(s, start, s.length());
   }
@@ -875,9 +872,8 @@ public class Regex extends RegRes implements FilenameFilter
   {
     if (s == null)
     {
-      throw new NullPointerException(
-              MessageManager
-                      .getString("exception.null_string_like_given_to_regex_search_region"));
+      throw new NullPointerException(MessageManager.getString(
+              "exception.null_string_like_given_to_regex_search_region"));
     }
     return _search(s, start, end);
   }
@@ -1943,9 +1939,9 @@ public class Regex extends RegRes implements FilenameFilter
    * optimized() method.
    * <p>
    * This method will attempt to rewrite your pattern in a way that makes it
-   * faster (not all patterns execute at the same speed). In general,
-   * "(?: ... )" will be faster than "( ... )" so if you don't need the
-   * backreference, you should group using the former pattern.
+   * faster (not all patterns execute at the same speed). In general, "(?: ...
+   * )" will be faster than "( ... )" so if you don't need the backreference,
+   * you should group using the former pattern.
    * <p>
    * It will also introduce new pattern elements that you can't get to
    * otherwise, for example if you have a large table of strings, i.e. the
@@ -2061,10 +2057,9 @@ public class Regex extends RegRes implements FilenameFilter
 
   boolean isHexDigit(StrPos sp)
   {
-    boolean r = !sp.eos
-            && !sp.dontMatch
-            && ((sp.c >= '0' && sp.c <= '9')
-                    || (sp.c >= 'a' && sp.c <= 'f') || (sp.c >= 'A' && sp.c <= 'F'));
+    boolean r = !sp.eos && !sp.dontMatch
+            && ((sp.c >= '0' && sp.c <= '9') || (sp.c >= 'a' && sp.c <= 'f')
+                    || (sp.c >= 'A' && sp.c <= 'F'));
     return r;
   }