update of javajs package; adds org.apache.harmony, org.xml.sax.helpers
[jalview.git] / src / javajs / util / BS.java
index 0bfa5a6..1f3aaa4 100644 (file)
@@ -79,7 +79,7 @@ import javajs.api.JSONEncodable;
  */
 public class BS implements Cloneable, JSONEncodable {
   /*
-   * BitSets are packed into arrays of "wrangeords."
+   * BitSets are packed into arrays of "words."
    * 
    * An int, which consists of 32 bits, requiring 5 address bits, is used for
    * the JavaScript port.
@@ -736,7 +736,7 @@ public class BS implements Cloneable, JSONEncodable {
      * @j2sNative
      *     if (n == this.words.length) return;
      *     if (n == this.wordsInUse) {
-     *      this.words = Clazz.newArray$(-1, this.words, 0, n);
+     *      this.words = Clazz.array(-1, this.words, 0, n);
      *      return;
      *     }
      */
@@ -818,7 +818,7 @@ public class BS implements Cloneable, JSONEncodable {
        * 
        * @j2sNative
        * 
-       *   bs.words = Clazz.newArray(-1, bitsetToCopy.words, 0, bs.wordsInUse = wordCount);
+       *   bs.words = Clazz.array(-1, bitsetToCopy.words, 0, bs.wordsInUse = wordCount);
        * 
        */
       {
@@ -907,11 +907,11 @@ public class BS implements Cloneable, JSONEncodable {
       return null;
     len -= 2;
     for (int i = len; --i >= 2;)
-      if (!PT.isDigit(ch = str.charAt(i)) && ch != ' ' && ch != '\t'
+      if (((ch = str.charAt(i)) < 48 || ch > 57) && ch != ' ' && ch != '\t'
           && ch != ':')
         return null;
     int lastN = len;
-    while (PT.isDigit(str.charAt(--lastN))) {
+    while (48 <= (ch = str.charAt(--lastN)) && ch <= 57) {
       // loop
     }
     if (++lastN == len)
@@ -947,7 +947,7 @@ public class BS implements Cloneable, JSONEncodable {
         iThis = -2;
         break;
       default:
-        if (PT.isDigit(ch)) {
+        if (48 <= ch && ch <= 57) {
           if (iThis < 0)
             iThis = 0;
           iThis = (iThis * 10) + (ch - 48);