Package java.util

Examples of java.util.LinkedHashMap.entrySet()


  }

  private static Map checkMap(Map paramMap, MapConstraint paramMapConstraint)
  {
    LinkedHashMap localLinkedHashMap = new LinkedHashMap(paramMap);
    Iterator localIterator = localLinkedHashMap.entrySet().iterator();
    while (localIterator.hasNext())
    {
      Map.Entry localEntry = (Map.Entry)localIterator.next();
      paramMapConstraint.checkKeyValue(localEntry.getKey(), localEntry.getValue());
    }
View Full Code Here


    public static String toString(Object target, Class stopClass) {
        LinkedHashMap map = new LinkedHashMap();
        addFields(target, target.getClass(), stopClass, map);
        StringBuffer buffer = new StringBuffer(simpleName(target.getClass()));
        buffer.append(" {");
        Set entrySet = map.entrySet();
        boolean first = true;
        for (Iterator iter = entrySet.iterator(); iter.hasNext();) {
            Map.Entry entry = (Map.Entry)iter.next();
            if (first) {
                first = false;
View Full Code Here

            // Note that the index also computes
            // the resulting Class-Path -- there are jars out there
            // where the index lists some required jars which do
            // not appear in the Class-Path attribute in the manifest.
            this.classPath = new ArrayList();
            Iterator it = indexMap.entrySet().iterator();
            while (it.hasNext())
              {
                Map.Entry entry = (Map.Entry) it.next();
                URL subURL = (URL) entry.getKey();
                Set prefixes = (Set) entry.getValue();
View Full Code Here

        // Remove the oldest entry if we're about to add a new one and that would put us over the cache size ...
        // We do a CACHE_SIZE*2 here because for every page, we have to potentially store its previous contextid to prevent
        // race conditions, so there technically can be 2x cache size many pages in the cache.
        boolean removedCacheEntry = cleanPageReplacementCacheIfNecessary(pageCacheKey);
        if (!removedCacheEntry && pageReplacementCache.size() >= ERXAjaxSession.MAX_PAGE_REPLACEMENT_CACHE_SIZE * 2) {
          Iterator entryIterator = pageReplacementCache.entrySet().iterator();
          Map.Entry oldestEntry = (Map.Entry) entryIterator.next();
          entryIterator.remove();
          if (logger.isDebugEnabled()) logger.debug(pageCacheKey + "pageReplacementCache too large, removing oldest entry = " + ((TransactionRecord)oldestEntry.getValue()).key());
        }

View Full Code Here

protected boolean cleanPageReplacementCacheIfNecessary(String _cacheKeyToAge) {
    boolean removedCacheEntry = false;
    LinkedHashMap pageReplacementCache = (LinkedHashMap) objectForKey(ERXAjaxSession.PAGE_REPLACEMENT_CACHE_KEY);
    if (logger.isDebugEnabled()) logger.debug("keys in pageReplacementCache: " + pageReplacementCache.keySet());
    if (pageReplacementCache != null) {
      Iterator transactionRecordsEnum = pageReplacementCache.entrySet().iterator();
      while (transactionRecordsEnum.hasNext()) {
        Map.Entry pageRecordEntry = (Map.Entry) transactionRecordsEnum.next();
        TransactionRecord tempPageRecord = (TransactionRecord) pageRecordEntry.getValue();
        // If the page has been GC'd, toss the transaction record ...
        if (tempPageRecord.isExpired()) {
View Full Code Here

            m.put(e.name, l);
          }
        else
          l.add(0, e.value);
      }
    for (Iterator it = m.entrySet().iterator(); it.hasNext(); )
      {
        Map.Entry me = (Map.Entry)it.next();
        ArrayList l = (ArrayList)me.getValue();
        me.setValue(Collections.unmodifiableList(l));
      }
View Full Code Here

    LinkedHashMap<File, ArrayList<Entry>> dirToEntries = new LinkedHashMap();
    process(files, outputRoot, outputRoot, dirToEntries, 0);

    ArrayList<Entry> allEntries = new ArrayList();
    for (java.util.Map.Entry<File, ArrayList<Entry>> mapEntry : dirToEntries.entrySet()) {
      ArrayList<Entry> dirEntries = mapEntry.getValue();
      if (comparator != null) Collections.sort(dirEntries, entryComparator);

      File inputDir = mapEntry.getKey();
      File newOutputDir = null;
View Full Code Here

            }
          }
        }
      }

      Set entrySet = params.entrySet();
      for (Iterator iterator = entrySet.iterator(); iterator.hasNext();) {
        Map.Entry entry = (Map.Entry) iterator.next();

        JSONObject dndParams = (JSONObject) entry.getValue();
View Full Code Here

    LinkedHashMap<File, ArrayList<Entry>> dirToEntries = new LinkedHashMap();
    process(files, outputRoot, outputRoot, dirToEntries, 0);

    ArrayList<Entry> allEntries = new ArrayList();
    for (java.util.Map.Entry<File, ArrayList<Entry>> mapEntry : dirToEntries.entrySet()) {
      ArrayList<Entry> dirEntries = mapEntry.getValue();
      if (comparator != null) Collections.sort(dirEntries, entryComparator);

      File inputDir = mapEntry.getKey();
      File newOutputDir = null;
View Full Code Here

/*      */       }
/*      */     }
/*      */     String propName;
/*      */     Object getterType;
/*      */     Iterator i$;
/* 1054 */     for (Map.Entry e : allSetters.entrySet())
/* 1055 */       setters.put(e.getKey(), ((List)e.getValue()).get(0));
/*      */   }
/*      */
/*      */   private boolean shouldRecurseSuperClass(C sc)
/*      */   {
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.