/[classpath]/classpath/java/lang/Character.java
ViewVC logotype

Diff of /classpath/java/lang/Character.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.31 by mark, Tue Aug 13 20:51:07 2002 UTC revision 1.32 by mark, Thu Oct 3 17:26:44 2002 UTC
# Line 1384  public final class Character implements Line 1384  public final class Character implements
1384    public static final byte DIRECTIONALITY_POP_DIRECTIONAL_FORMAT = 18;    public static final byte DIRECTIONALITY_POP_DIRECTIONAL_FORMAT = 18;
1385    
1386    /**    /**
    * Returns the value array of the given string if it is zero based or a  
    * copy of it that is zero based (stripping offset and making length equal  
    * to count). Used for accessing the char[]s of gnu.java.lang.CharData.  
    * Package private for use in String.  
    */  
   static char[] zeroBasedStringValue(String s)  
   {  
     char[] value;  
   
     if (s.offset == 0 && s.count == s.value.length)  
       value = s.value;  
     else  
       {  
         int count = s.count;  
         value = new char[count];  
         System.arraycopy(s.value, s.offset, value, 0, count);  
       }  
   
     return value;  
   }  
   
   /**  
1387     * Stores unicode block offset lookup table. Exploit package visibility of     * Stores unicode block offset lookup table. Exploit package visibility of
1388     * String.value to avoid copying the array.     * String.value to avoid copying the array.
1389     * @see #readChar(char)     * @see #readChar(char)
1390     * @see CharData#BLOCKS     * @see CharData#BLOCKS
1391     */     */
1392    private static final char[] blocks = zeroBasedStringValue(CharData.BLOCKS);    private static final char[] blocks = String.zeroBasedStringValue(CharData.BLOCKS);
1393    
1394    /**    /**
1395     * Stores unicode attribute offset lookup table. Exploit package visibility     * Stores unicode attribute offset lookup table. Exploit package visibility
1396     * of String.value to avoid copying the array.     * of String.value to avoid copying the array.
1397     * @see CharData#DATA     * @see CharData#DATA
1398     */     */
1399    private static final char[] data = zeroBasedStringValue(CharData.DATA);    private static final char[] data = String.zeroBasedStringValue(CharData.DATA);
1400    
1401    /**    /**
1402     * Stores unicode numeric value attribute table. Exploit package visibility     * Stores unicode numeric value attribute table. Exploit package visibility
# Line 1426  public final class Character implements Line 1404  public final class Character implements
1404     * @see CharData#NUM_VALUE     * @see CharData#NUM_VALUE
1405     */     */
1406    private static final char[] numValue    private static final char[] numValue
1407            = zeroBasedStringValue(CharData.NUM_VALUE);            = String.zeroBasedStringValue(CharData.NUM_VALUE);
1408    
1409    /**    /**
1410     * Stores unicode uppercase attribute table. Exploit package visibility     * Stores unicode uppercase attribute table. Exploit package visibility
1411     * of String.value to avoid copying the array.     * of String.value to avoid copying the array.
1412     * @see CharData#UPPER     * @see CharData#UPPER
1413     */     */
1414    private static final char[] upper = zeroBasedStringValue(CharData.UPPER);    private static final char[] upper = String.zeroBasedStringValue(CharData.UPPER);
1415    
1416    /**    /**
1417     * Stores unicode lowercase attribute table. Exploit package visibility     * Stores unicode lowercase attribute table. Exploit package visibility
1418     * of String.value to avoid copying the array.     * of String.value to avoid copying the array.
1419     * @see CharData#LOWER     * @see CharData#LOWER
1420     */     */
1421    private static final char[] lower = zeroBasedStringValue(CharData.LOWER);    private static final char[] lower = String.zeroBasedStringValue(CharData.LOWER);
1422    
1423    /**    /**
1424     * Stores unicode direction attribute table. Exploit package visibility     * Stores unicode direction attribute table. Exploit package visibility
# Line 1448  public final class Character implements Line 1426  public final class Character implements
1426     * @see CharData#DIRECTION     * @see CharData#DIRECTION
1427     */     */
1428    // Package visible for use by String.    // Package visible for use by String.
1429    static final char[] direction = zeroBasedStringValue(CharData.DIRECTION);    static final char[] direction = String.zeroBasedStringValue(CharData.DIRECTION);
1430    
1431    /**    /**
1432     * Stores unicode titlecase table. Exploit package visibility of     * Stores unicode titlecase table. Exploit package visibility of
1433     * String.value to avoid copying the array.     * String.value to avoid copying the array.
1434     * @see CharData#TITLE     * @see CharData#TITLE
1435     */     */
1436    private static final char[] title = zeroBasedStringValue(CharData.TITLE);    private static final char[] title = String.zeroBasedStringValue(CharData.TITLE);
1437    
1438    /**    /**
1439     * Mask for grabbing the type out of the contents of data.     * Mask for grabbing the type out of the contents of data.

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26