< prev index next >

src/com/sun/org/apache/xerces/internal/impl/xpath/regex/CaseInsensitiveMap.java

Print this page
rev 2127 : 8048021: Remove @version tag in jaxp repo
Reviewed-by: joehw


   5 /*
   6  * Licensed to the Apache Software Foundation (ASF) under one or more
   7  * contributor license agreements.  See the NOTICE file distributed with
   8  * this work for additional information regarding copyright ownership.
   9  * The ASF licenses this file to You under the Apache License, Version 2.0
  10  * (the "License"); you may not use this file except in compliance with
  11  * the License.  You may obtain a copy of the License at
  12  *
  13  *      http://www.apache.org/licenses/LICENSE-2.0
  14  *
  15  * Unless required by applicable law or agreed to in writing, software
  16  * distributed under the License is distributed on an "AS IS" BASIS,
  17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18  * See the License for the specific language governing permissions and
  19  * limitations under the License.
  20  */
  21 
  22 package com.sun.org.apache.xerces.internal.impl.xpath.regex;
  23 
  24 /**
  25  * @version $Id: CaseInsensitiveMap.java,v 1.1 2010/07/27 06:29:27 joehw Exp $
  26  */
  27 
  28 public class CaseInsensitiveMap {
  29 
  30     private static int CHUNK_SHIFT = 10;           /* 2^10 = 1k */
  31     private static int CHUNK_SIZE = (1<<CHUNK_SHIFT);
  32     private static int CHUNK_MASK = (CHUNK_SIZE-1);
  33     private static int INITIAL_CHUNK_COUNT = 64;   /* up to 0xFFFF */
  34 
  35     private static int[][][] caseInsensitiveMap;
  36     private static Boolean mapBuilt = Boolean.FALSE;
  37 
  38     private static int LOWER_CASE_MATCH = 1;
  39     private static int UPPER_CASE_MATCH = 2;
  40 
  41     /**
  42      *  Return a list of code point characters (not including the input value)
  43      *  that can be substituted in a case insensitive match
  44      */
  45     static public int[] get(int codePoint) {




   5 /*
   6  * Licensed to the Apache Software Foundation (ASF) under one or more
   7  * contributor license agreements.  See the NOTICE file distributed with
   8  * this work for additional information regarding copyright ownership.
   9  * The ASF licenses this file to You under the Apache License, Version 2.0
  10  * (the "License"); you may not use this file except in compliance with
  11  * the License.  You may obtain a copy of the License at
  12  *
  13  *      http://www.apache.org/licenses/LICENSE-2.0
  14  *
  15  * Unless required by applicable law or agreed to in writing, software
  16  * distributed under the License is distributed on an "AS IS" BASIS,
  17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18  * See the License for the specific language governing permissions and
  19  * limitations under the License.
  20  */
  21 
  22 package com.sun.org.apache.xerces.internal.impl.xpath.regex;
  23 
  24 /**

  25  */
  26 
  27 public class CaseInsensitiveMap {
  28 
  29     private static int CHUNK_SHIFT = 10;           /* 2^10 = 1k */
  30     private static int CHUNK_SIZE = (1<<CHUNK_SHIFT);
  31     private static int CHUNK_MASK = (CHUNK_SIZE-1);
  32     private static int INITIAL_CHUNK_COUNT = 64;   /* up to 0xFFFF */
  33 
  34     private static int[][][] caseInsensitiveMap;
  35     private static Boolean mapBuilt = Boolean.FALSE;
  36 
  37     private static int LOWER_CASE_MATCH = 1;
  38     private static int UPPER_CASE_MATCH = 2;
  39 
  40     /**
  41      *  Return a list of code point characters (not including the input value)
  42      *  that can be substituted in a case insensitive match
  43      */
  44     static public int[] get(int codePoint) {


< prev index next >