Package java.util

Examples of java.util.Map


      return new String[]{"/command"};
   }

   public void execute(WebAppController controller, HttpServletRequest req, HttpServletResponse res) throws Exception
   {
      Map props = req.getParameterMap();
      String type = req.getParameter("type");
      if (type == null || type.trim().length() < 1)
         throw new NullPointerException("Unknown type command handler");
      Command command = createCommand(type, props);
      if (command == null)
View Full Code Here


    public void setMovingAvgFrame(int movingAvgFrame) {
        this.movingAvgFrame = movingAvgFrame;
    }

    public void populate(DefaultTableXYDataset dataset, StatsCollection statsCollection, HttpServletRequest request) {
        Map statMap = statsCollection.getStatsByPrefix(statNamePrefix);
        boolean useTop = getTop() > 0 && getTop() < statMap.size();
        List seriesList = new ArrayList();

        for(Iterator i = statMap.entrySet().iterator(); i.hasNext();) {
            Series ser = new Series((Map.Entry) i.next());
            if (useTop) {
                ser.calculateAvg();
            }
            seriesList.add(ser);
View Full Code Here

      }
     
      HashSet testNames = new HashSet();
        Iterator i = chainOfMappings.iterator();
        while (i.hasNext()) {
            Map aMapping = (Map) i.next();
      testNames.addAll(aMapping.keySet());
        }     
    return propNames.containsAll(testNames);
  }
View Full Code Here

      boolean foundKey = false;
            String propName = (String) e.nextElement();
      String propValue = props.getProperty(propName);
            Iterator i = chainOfMappings.iterator();
            while (i.hasNext() && !foundKey) {
                Map aMapping = (Map) i.next();
                Object value = aMapping.get(propName);
        if (value != null){
            foundKey = true;
          allGood = propValue.equals(value);
        }
            }
View Full Code Here

        {
          java.util.Set  types = new HashSet();
         
          types.add( AzureusCoreStats.ST_ALL );
         
          Map  reply = AzureusCoreStats.getStats( types );
         
          Iterator  it = reply.entrySet().iterator();
         
          StringBuffer buffer = new StringBuffer(16000);
         
          while( it.hasNext()){
           
View Full Code Here

      FileInputStream fin = null;
      BufferedInputStream bin = null;
      try {
        fin = new FileInputStream(fTrackers);
        bin = new BufferedInputStream(fin, 8192);
        Map map = BDecoder.decode(bin);
        List list = (List) map.get("trackers");
        if(list != null) {
          Iterator iter = list.iterator();
          while(iter.hasNext()) {
            String tracker =  new String((byte[])iter.next());
            trackers.add(tracker);
          }
        }
        Map mapMT = (Map) map.get("multi-trackers");
        if(mapMT != null) {
          Iterator iter = mapMT.keySet().iterator();
          while(iter.hasNext()) {
            String configName =  (String) iter.next();           
            List groups = (List) mapMT.get(configName);
            List resGroups = new ArrayList(groups.size());
            Iterator iterGroups = groups.iterator();
            while(iterGroups.hasNext()) {
              List theseTrackers = (List) iterGroups.next();
              List resTrackers = new ArrayList(theseTrackers.size());
View Full Code Here

    }
    }
  }
 
  private void saveList() {
    Map map = new HashMap();
    map.put("trackers",trackers);
    map.put("multi-trackers",multiTrackers);
    map.put("webseeds",webseeds );
    FileOutputStream fos = null;
    try {
      //  Open the file
      File fTrackers = FileUtil.getUserFile("trackers.config");
      fos = new FileOutputStream(fTrackers);
View Full Code Here

  private void displayOptions(PrintStream out, StringPattern sp, boolean non_defaults)
  {
    sp.setIgnoreCase(true);
    Iterator I = non_defaults?COConfigurationManager.getDefinedParameters().iterator():COConfigurationManager.getAllowedParameters().iterator();
    Map backmap = new HashMap();
    for (Iterator iter = ExternalUIConst.parameterlegacy.entrySet().iterator(); iter.hasNext();) {
      Map.Entry entry = (Map.Entry) iter.next();
      backmap.put( entry.getValue(), entry.getKey() );
    }
    TreeSet srt = new TreeSet();
    while (I.hasNext()) {
      String internal_name = (String) I.next();
     
      String  external_name = (String) backmap.get(internal_name);
     
      if ( external_name == null ){
       
        external_name = internal_name;
      }
View Full Code Here

     
      java.util.Set  types = new HashSet();
     
      types.add( pattern );
     
      Map  reply = AzureusCoreStats.getStats( types );
     
      Iterator  it = reply.entrySet().iterator();
     
      List  lines = new ArrayList();
     
      while( it.hasNext()){
       
View Full Code Here

   
    if ( nat_traversal || TEST_TUNNEL ){
     
      final NATTraverser  nat_traverser = message_manager.getNATTraverser();
     
      Map  request = new HashMap();
               
      nat_traverser.attemptTraversal(
          message_manager,
          udp_ep,
          request,
View Full Code Here

TOP

Related Classes of java.util.Map

Copyright © 2015 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.