Examples of IntHashMap


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

Examples of net.sf.saxon.sort.IntHashMap

            // 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

Examples of net.sf.saxon.sort.IntHashMap

            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

Examples of net.sf.saxon.sort.IntHashMap

     * 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

Examples of net.sf.saxon.sort.IntHashMap

    * 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

Examples of net.sf.saxon.sort.IntHashMap

            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

Examples of net.sf.saxon.sort.IntHashMap

            // 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

Examples of net.sf.saxon.sort.IntHashMap

     */

    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

Examples of org.apache.wicket.util.collections.IntHashMap

      if (pageMaps == null)
      {
        pageMaps = new HashMap();
        SecondLevelCacheSessionStore.getUsedPages().set(pageMaps);
      }
      IntHashMap pages = (IntHashMap)pageMaps.get(pageMapName);
      if (pages == null)
      {
        pages = new IntHashMap();
        pageMaps.put(pageMapName, pages);
      }

      // register the new page instance so that when the same page is being deserialized
      // (curricular page references) we can use existing page instance (otherwise deadlock
      // would happen)
     
      pages.put(id, page);

      stream.defaultReadObject();
    }
View Full Code Here

Examples of org.apache.wicket.util.collections.IntHashMap

      if (pageMaps == null)
      {
        pageMaps = new HashMap();
        usedPages.set(pageMaps);
      }
      IntHashMap pages = (IntHashMap)pageMaps.get(getName());
      if (pages == null)
      {
        pages = new IntHashMap();
        pageMaps.put(getName(), pages);
      }

      // for now i only get by id.
      // does it really make any sense that there are multiply instances
      // of the
      // same page are alive in one session??
      Page page = (Page)pages.get(id);
      if (page != null)
      {
        return page;
      }

      String sessionId = getSession().getId();
      if (getLastPage() != null && getLastPage().getNumericId() == id)
      {
        page = versionNumber != -1 ? getLastPage().getVersion(versionNumber)
          : getLastPage();
        if (page != null)
        {
          // ask the page store if it is ready saving the page.
          getStore().pageAccessed(sessionId, page);
          pages.put(id, page);
          return page;
        }
      }
      if (sessionId != null)
      {
        setLastPage(null);
        page = getStore().getPage(sessionId, getName(), id, versionNumber, -1);
        pages.put(id, page);
        return page;

      }
      return null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.