Package java.util

Examples of java.util.IdentityHashMap$IdentityHashMapSpliterator


            Do not call this method on the static instances.
        */
        public Map getData ()
        {
            IdentityHashMap data = new IdentityHashMap(3);
            if (_statsByType != null) {
                data.put(ColumnEventDetail, _statsByType);
            }
            return data;
        }
View Full Code Here


  protected void implementInterfacesOnObject(Object delegate) {
    this.publishedInterfaces.addAll(ClassUtils.getAllInterfacesAsSet(delegate));
  }

  private Map createRememberedMethodMap() {
    return new IdentityHashMap(32);
  }
View Full Code Here

    private static Object recursionCheck = new Object();

    public CopyState(TypeRepository rep) {
        this.rep = rep;
        this.copied = new IdentityHashMap();
        this.recursionResolverMap = new IdentityHashMap();
    }
View Full Code Here

     */
    final void setMapForField(final Class<?> classe, final String name) {
        try {
            final Field field = classe.getDeclaredField(name);
            field.setAccessible(true);
            field.set(this, new IdentityHashMap());
        } catch (Exception e) { // (ReflectiveOperationException) on JDK7 branch.
            throw new AssertionError(e); // Should never happen (tested by MetadataStandardTest).
        }
    }
View Full Code Here

    /** listener notified of validation constraint violations. */
    private T listener;

    public BeanValidationContext(T listener) {
        this(listener, new IdentityHashMap());
    }
View Full Code Here

        }
        return super.retainAll(c);
    }

    public synchronized boolean containsAll(Collection<?> c) {
        IdentityHashMap map = new IdentityHashMap();
        for (Object e : this) {
            map.put(e, Boolean.TRUE);
        }
        return map.keySet().containsAll(c);
    }
View Full Code Here

            return false;
        }
       
        Object hthr = _threadHash.get(Thread.currentThread());
        if (hthr == null) {
            _threadHash.put(Thread.currentThread(), hthr = new IdentityHashMap());
            ((IdentityHashMap) hthr).put(beingHashed, beingHashed);
            return false; // first call. no cycle detected
        }
        Object objhandle = ((IdentityHashMap) hthr).get(beingHashed);
        if (objhandle == null) {
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(ErrorConstants.ILLEGAL_CONFIG,
                        "Not all AND states active for parallel "
                        + p.getId(), entry);
                    legalConfig = false;
                }
            } else {
                if (count.size() > 1) {
                    errRep.onError(ErrorConstants.ILLEGAL_CONFIG,
                        "Multiple OR states active for state "
                        + tt.getId(), entry);
                    legalConfig = false;
                }
            }
            count.clear(); //cleanup
        }
        if (scxmlCount.size() > 1) {
            errRep.onError(ErrorConstants.ILLEGAL_CONFIG,
                    "Multiple top-level OR states active!", scxmlCount);
        }
        //cleanup
        scxmlCount.clear();
        counts.clear();
        return legalConfig;
    }
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

   * @return the new Map instance
   * @deprecated as of Spring 2.5, for usage on JDK 1.4 or higher
   */
  @Deprecated
  public static Map createIdentityMapIfPossible(int initialCapacity) {
    return new IdentityHashMap(initialCapacity);
  }
View Full Code Here

TOP

Related Classes of java.util.IdentityHashMap$IdentityHashMapSpliterator

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.