Package java.util

Examples of java.util.Hashtable.elements()


            }

            toAnalyze.clear();

            // now recover all the dependencies collected and add to the list.
            Enumeration depsEnum = analyzedDeps.elements();
            while (depsEnum.hasMoreElements()) {
                String className = (String) depsEnum.nextElement();
                if (!dependencies.containsKey(className)) {
                    toAnalyze.put(className, className);
                }
View Full Code Here


                }
            }
        }

        // pick up the last round of dependencies that were determined
        Enumeration depsEnum = analyzedDeps.elements();
        while (depsEnum.hasMoreElements()) {
            String className = (String) depsEnum.nextElement();
            dependencies.put(className, className);
        }
View Full Code Here

      int port = req.getConnection().getPort();

      // First search for an exact match

      Hashtable AuthList = Util.getList(CntxtList, req.getConnection().getContext());
      Enumeration list = AuthList.elements();
      while (list.hasMoreElements())
      {
         AuthorizationInfo info = (AuthorizationInfo)list.nextElement();

         if (!info.host.equals(host) || info.port != port)
View Full Code Here

      AuthorizationInfo best = null;
      String base = path.substring(0, path.lastIndexOf('/') + 1);
      int min = Integer.MAX_VALUE;

      list = AuthList.elements();
      while (list.hasMoreElements())
      {
         AuthorizationInfo info = (AuthorizationInfo)list.nextElement();

         if (!info.host.equals(host) || info.port != port)
View Full Code Here

      Vector lens = new Vector();
      int version = 0;

      synchronized (cookie_list)
      {
         Enumeration list = cookie_list.elements();
         Vector remove_list = null;

         while (list.hasMoreElements())
         {
            Cookie cookie = (Cookie)list.nextElement();
View Full Code Here

         {
            Hashtable cntxt = (Hashtable)cntxt_list.nextElement();
            synchronized (cntxt)
            {
               cookies = Util.resizeArray(cookies, idx + cntxt.size());
               Enumeration cookie_list = cntxt.elements();
               while (cookie_list.hasMoreElements())
                  cookies[idx++] = (Cookie)cookie_list.nextElement();
            }
         }
View Full Code Here

      synchronized (cookie_list)
      {
         Cookie[] cookies = new Cookie[cookie_list.size()];
         int idx = 0;

         Enumeration en = cookie_list.elements();
         while (en.hasMoreElements())
            cookies[idx++] = (Cookie)en.nextElement();

         return cookies;
      }
View Full Code Here

      {
        // We walk through the keys while we modify the hashtable. This
        // is not legal, and the result of the enumaration is undefined,
        // but we should not get any exception when enumerating and we
        // should not get null or any key that was never added.
        for (Enumeration e = ht.elements(); e.hasMoreElements(); )
          {
            String str = (String) e.nextElement();
            if (str != null && !allElements.containsKey(str))
              {
                returnedOnlyElementsThatWerePut = false;
View Full Code Here

            pe.setMaxValue( new Integer( count ) );
            pe.setCurrentValue( 0 );
            pe.dispatch();
            int index = 1;
            //noinspection MethodCallInLoopCondition
            for( Enumeration i = map.elements(); i.hasMoreElements(); )
            {
                pe.setMessage( index + "/" + count );
                index++;
                pe.increment();
                pe.dispatch();
View Full Code Here

    {
        final Hashtable toSave = this.toSave;
        try
        {
            //noinspection MethodCallInLoopCondition
            for( Enumeration i = toSave.elements(); i.hasMoreElements(); )
            {
                final Node node = (Node) i.nextElement();
                saveNode( node );
            }
        }
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.