Package net.sf.saxon.sort

Examples of net.sf.saxon.sort.IntHashMap


     */

    static NormalizerData build() {
        IntToIntMap canonicalClass = new IntToIntHashMap(400);
        canonicalClass.setDefaultValue(0);
        IntHashMap decompose = new IntHashMap(18000);
        IntToIntMap compose = new IntToIntHashMap(15000);
        compose.setDefaultValue(NormalizerData.NOT_COMPOSITE);
        BitSet isCompatibility = new BitSet(128000);
        BitSet isExcluded = new BitSet(128000);

View Full Code Here


            // merge the character maps, allowing definitions in a later map
            // to overwrite definitions in an earlier map. (Note, we don't really
            // need to do this if there is only one map, but we want to scan the keys
            // anyway to extract the mimimum and maximum mapped characters.)

        charMap = new IntHashMap(64);
        for (int i = 0; i < maps.size(); i++) {
            IntHashMap hashMap = (IntHashMap)maps.get(i);
            IntIterator keys = hashMap.keyIterator();
            while (keys.hasNext()) {
                int next = keys.next();
                if (next < min) {
                    min = next;
                }
                if (next > max) {
                    max = next;
                }
                if (!mapsWhitespace && Whitespace.isWhitespace(next)) {
                    mapsWhitespace = true;
                }
                charMap.put(next, hashMap.get(next));
            }
        }
        if (min > 0xD800) {
            // if all the mapped characters are above the BMP, we need to check
            // surrogates
View Full Code Here

            unnamedElementRuleChain =
                    omniMode.unnamedElementRuleChain==null ? null : new Rule(omniMode.unnamedElementRuleChain);
            unnamedAttributeRuleChain =
                    omniMode.unnamedAttributeRuleChain==null ? null : new Rule(omniMode.unnamedAttributeRuleChain);

            namedElementRuleChains = new IntHashMap(omniMode.namedElementRuleChains.size());
            IntIterator ii = omniMode.namedElementRuleChains.keyIterator();
            while (ii.hasNext()) {
                int fp = ii.next();
                Rule r = omniMode.namedElementRuleChains.get(fp);
                namedElementRuleChains.put(fp, new Rule(r));
View Full Code Here

     * Check that no character is used in more than one role
     * @throws XPathException
     */

    public void checkDistinctRoles() throws XPathException {
        IntHashMap map = new IntHashMap(20);
        map.put(decimalSeparator, StandardNames.DECIMAL_SEPARATOR);

        if (map.get(groupingSeparator) != null) {
            duplicate(StandardNames.GROUPING_SEPARATOR, (String)map.get(groupingSeparator));
        }
        map.put(groupingSeparator, StandardNames.GROUPING_SEPARATOR);

        if (map.get(percent) != null) {
            duplicate(StandardNames.PERCENT, (String)map.get(percent));
        }
        map.put(percent, StandardNames.PERCENT);

        if (map.get(permill) != null) {
            duplicate(StandardNames.PER_MILLE, (String)map.get(permill));
        }
        map.put(permill, StandardNames.PER_MILLE);

        if (map.get(zeroDigit) != null) {
            duplicate(StandardNames.ZERO_DIGIT, (String)map.get(zeroDigit));
        }
        map.put(zeroDigit, StandardNames.ZERO_DIGIT);

        if (map.get(digit) != null) {
            duplicate(StandardNames.DIGIT, (String)map.get(digit));
        }
        map.put(digit, StandardNames.DIGIT);

        if (map.get(patternSeparator) != null) {
            duplicate(StandardNames.PATTERN_SEPARATOR, (String)map.get(patternSeparator));
        }
        //map.put(patternSeparator, StandardNames.PATTERN_SEPARATOR);
    }
View Full Code Here

    * element type, it remembers the result for next time.
    */

    AxisIterator getAllElements(int fingerprint) {
      if (elementList==null) {
          elementList = new IntHashMap(20);
      }
        List list = (List)elementList.get(fingerprint);
        if (list==null) {
            list = getElementList(fingerprint);
            elementList.put(fingerprint, list);
View Full Code Here

            List characterMaps = new ArrayList(5);
            StringTokenizer st = new StringTokenizer(useMaps, " \t\n\r", false);
            while (st.hasMoreTokens()) {
                String expandedName = st.nextToken();
                StructuredQName qName = StructuredQName.fromClarkName(expandedName);
                IntHashMap map = (IntHashMap)characterMapIndex.get(qName);
                if (map==null) {
                    throw new XPathException("Character map '" + expandedName + "' has not been defined");
                }
                characterMaps.add(map);
            }
View Full Code Here

            // merge the character maps, allowing definitions in a later map
            // to overwrite definitions in an earlier map. (Note, we don't really
            // need to do this if there is only one map, but we want to scan the keys
            // anyway to extract the mimimum and maximum mapped characters.)

        charMap = new IntHashMap(64);
        for (int i = 0; i < maps.size(); i++) {
            IntHashMap hashMap = (IntHashMap)maps.get(i);
            IntIterator keys = hashMap.keyIterator();
            while (keys.hasNext()) {
                int next = keys.next();
                if (next < min) {
                    min = next;
                }
                if (next > max) {
                    max = next;
                }
                if (!mapsWhitespace && Whitespace.isWhitespace(next)) {
                    mapsWhitespace = true;
                }
                charMap.put(next, hashMap.get(next));
            }
        }
        if (min > 0xD800) {
            // if all the mapped characters are above the BMP, we need to check
            // surrogates
View Full Code Here

     */

    static NormalizerData build() {
        IntToIntHashMap canonicalClass = new IntToIntHashMap(400);
        canonicalClass.setDefaultValue(0);
        IntHashMap decompose = new IntHashMap(18000);
        IntToIntHashMap compose = new IntToIntHashMap(15000);
        compose.setDefaultValue(NormalizerData.NOT_COMPOSITE);
        BitSet isCompatibility = new BitSet(128000);
        BitSet isExcluded = new BitSet(128000);

View Full Code Here

TOP

Related Classes of net.sf.saxon.sort.IntHashMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.