JAL-3438 spotless for 2.11.2.0
[jalview.git] / src / com / stevesoft / pat / Replacer.java
index 6eaf5f6..adc3750 100755 (executable)
@@ -49,8 +49,8 @@ class CodeVal
  * <p>
  * The only potential difference between using the methods of Replacer to do the
  * replacing is that Replacer remembers changes to the replacing object between
- * calls to replaceAll, replaceFirst etc. For details, see the example file <a
- * href="http://javaregex.com/code/trans3.java.html">trans3.java</a>.
+ * calls to replaceAll, replaceFirst etc. For details, see the example file
+ * <a href="http://javaregex.com/code/trans3.java.html">trans3.java</a>.
  * 
  * @see com.stevesoft.pat.Transformer
  * @see com.stevesoft.pat.Regex
@@ -64,7 +64,8 @@ public class Replacer
   {
   }
 
-  public StringLike replaceFirstRegion(String s, Regex r, int start, int end)
+  public StringLike replaceFirstRegion(String s, Regex r, int start,
+          int end)
   {
     return replaceFirstRegion(new StringWrap(s), r, start, end);
   }
@@ -156,8 +157,8 @@ public class Replacer
   {
     while (x != null)
     {
-      if (x instanceof SpecialRule
-              || (x instanceof RuleHolder && ((RuleHolder) x).held instanceof SpecialRule))
+      if (x instanceof SpecialRule || (x instanceof RuleHolder
+              && ((RuleHolder) x).held instanceof SpecialRule))
       {
         return true;
       }
@@ -180,9 +181,8 @@ public class Replacer
     lastMatchedTo = 0;
     if (rh.me == null)
     {
-      throw new NullPointerException(
-              MessageManager
-                      .getString("exception.replace_null_regex_pointer"));
+      throw new NullPointerException(MessageManager
+              .getString("exception.replace_null_regex_pointer"));
     }
     if (rh.me._search(s, start, end))
     {
@@ -195,7 +195,8 @@ public class Replacer
       apply(rh.me);
       if (!first)
       {
-        for (int i = rmn; !want_more_text && rh.me._search(s, i, end); i = rmn)
+        for (int i = rmn; !want_more_text
+                && rh.me._search(s, i, end); i = rmn)
         {
           rmn = rh.me.matchedTo();
           if (rh.me.charsMatched() == 0)