JAL-845 minor tidy / tests / javadoc tweaks
[jalview.git] / src / jalview / util / Comparison.java
index 259a5d8..b9a95be 100644 (file)
@@ -31,7 +31,14 @@ public class Comparison
 
   private static final int TO_UPPER_CASE = 'a' - 'A';
 
-  public static final String GapChars = " .-";
+  private static final char GAP_SPACE = ' ';
+
+  private static final char GAP_DOT = '.';
+
+  private static final char GAP_DASH = '-';
+
+  public static final String GapChars = new String(new char[]
+  { GAP_SPACE, GAP_DOT, GAP_DASH });
 
   /**
    * DOCUMENT ME!
@@ -235,7 +242,7 @@ public class Comparison
    */
   public static final boolean isGap(char c)
   {
-    return (c == '-' || c == '.' || c == ' ') ? true : false;
+    return (c == GAP_DASH || c == GAP_DOT || c == GAP_SPACE) ? true : false;
   }
 
   /**