Package java.util

Examples of java.util.IdentityHashMap$KeySpliterator


        if (type == Hashtable.class) {
            return new Hashtable();
        }

        if (type == IdentityHashMap.class) {
            return new IdentityHashMap();
        }

        if (type == SortedMap.class || type == TreeMap.class) {
            return new TreeMap();
        }
View Full Code Here


        if (HashMap.class == cl) {
            result = new HashMap();
        } else if (Hashtable.class == cl) {
            result = new Hashtable();
        } else if (IdentityHashMap.class == cl) {
            result = new IdentityHashMap();
        } else if (LinkedHashMap.class == cl) {
            result = new LinkedHashMap();
        } else if (Properties.class == cl) {
            result = new Properties();
        } else if (TreeMap.class == cl) {
View Full Code Here

  /**
   * Returns a new non-threadsafe context map.
   */
  public static Map newContext(IndexSearcher searcher) {
    Map context = new IdentityHashMap();
    context.put("searcher", searcher);
    return context;
  }
View Full Code Here

    private Map valueToName;
    private Map nameToCount;

    public NameGenerator() {
        valueToName = new IdentityHashMap();
        nameToCount = new HashMap();
    }
View Full Code Here

        } else if (clazz.isAssignableFrom(ConcurrentHashMap.class)) {
            value = new ConcurrentHashMap();
        } else if (clazz.isAssignableFrom(Properties.class)) {
            value = new Properties();
        } else if (clazz.isAssignableFrom(IdentityHashMap.class)) {
            value = new IdentityHashMap();
        }

        if (clazz == Class.class) {
            Object classValue = parser.parse();
            if (classValue == null) {
View Full Code Here

        while (bestFragments.size() > 0) {
            FragmentInfo fi = (FragmentInfo) bestFragments.pop();
            infos.add(0, fi);
        }

        Map offsetInfos = new IdentityHashMap();
        // remove overlapping fragment infos
        Iterator it = infos.iterator();
        while (it.hasNext()) {
            FragmentInfo fi = (FragmentInfo) it.next();
            boolean overlap = false;
            Iterator fit = fi.iterator();
            while (fit.hasNext() && !overlap) {
                TermVectorOffsetInfo oi = (TermVectorOffsetInfo) fit.next();
                if (offsetInfos.containsKey(oi)) {
                    overlap = true;
                }
            }
            if (overlap) {
                it.remove();
            } else {
                Iterator oit = fi.iterator();
                while (oit.hasNext()) {
                    offsetInfos.put(oit.next(), null);
                }
            }
        }

        // create excerpts
View Full Code Here

         * 1. SCXML elemnt (top) should reach count exactly 1. We essentially
         * summarize up the hierarchy tree starting with a given set of
         * states = active configuration.
         */
        boolean legalConfig = true; // let's be optimists
        Map counts = new IdentityHashMap();
        Set scxmlCount = new HashSet();
        for (Iterator i = states.iterator(); i.hasNext();) {
            TransitionTarget tt = (TransitionTarget) i.next();
            TransitionTarget parent = null;
            while ((parent = tt.getParent()) != null) {
                HashSet cnt = (HashSet) counts.get(parent);
                if (cnt == null) {
                    cnt = new HashSet();
                    counts.put(parent, cnt);
                }
                cnt.add(tt);
                tt = parent;
            }
            //top-level contribution
            scxmlCount.add(tt);
        }
        //Validate counts:
        for (Iterator i = counts.entrySet().iterator(); i.hasNext();) {
            Map.Entry entry = (Map.Entry) i.next();
            TransitionTarget tt = (TransitionTarget) entry.getKey();
            Set count = (Set) entry.getValue();
            if (tt instanceof Parallel) {
                Parallel p = (Parallel) tt;
                if (count.size() < p.getStates().size()) {
                    errRep.onError(ErrorReporter.ILLEGAL_CONFIG,
                        "Not all AND states active for parallel "
                        + p.getId(), entry);
                    legalConfig = false;
                }
            } else {
                if (count.size() > 1) {
                    errRep.onError(ErrorReporter.ILLEGAL_CONFIG,
                        "Multiple OR states active for state "
                        + tt.getId(), entry);
                    legalConfig = false;
                }
            }
            count.clear(); //cleanup
        }
        if (scxmlCount.size() > 1) {
            errRep.onError(ErrorReporter.ILLEGAL_CONFIG,
                    "Multiple top-level OR states active!", scxmlCount);
        }
        //cleanup
        scxmlCount.clear();
        counts.clear();
        return legalConfig;
    }
View Full Code Here

    /**
     * @see org.apache.derby.iapi.sql.conn.LanguageConnectionContext#getPrintedObjectsMap
     */
    public Map getPrintedObjectsMap() {
        if (printedObjectsMap == null) {
            printedObjectsMap = new IdentityHashMap();
        }
        return printedObjectsMap;
    }
View Full Code Here

   * @generated
   */
  public static ENamedElement getElement(IAdaptable hint) {
    Object type = hint.getAdapter(IElementType.class);
    if (elements == null) {
      elements = new IdentityHashMap();

      elements.put(TreeModelType_1000,
          org.dmg.pmml._40._40Package.eINSTANCE.getTreeModelType());

      elements.put(NodeType_2001, org.dmg.pmml._40._40Package.eINSTANCE
View Full Code Here

  public void createWeight(Map context, Searcher searcher) throws IOException {
  }

  /** Returns a new non-threadsafe context map. */
  public static Map newContext() {
    return new IdentityHashMap();
  }
View Full Code Here

TOP

Related Classes of java.util.IdentityHashMap$KeySpliterator

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.