Package java.util

Examples of java.util.List.addAll()


    torrents = matchRange(torrentsToMatch, allArgs.toString());
    if( torrents.size() > 0 )
      return torrents;
    // if no torrents then handle each argument individually
    for (Iterator iter = args.iterator(); iter.hasNext();) {
      torrents.addAll(getTorrents(torrentsToMatch, (String)iter.next()) );
    }
    return torrents;
  }
}
View Full Code Here


      command = command.substring(1);
    else if( aliases.containsKey(command) )
    {
      List list = br.parseCommandLine(aliases.getProperty(command));
      String newCommand = list.remove(0).toString().toLowerCase();
      list.addAll( cargs );
      return invokeCommand(newCommand, list);
    }
    if (commands.containsKey(command)) {
      IConsoleCommand cmd = (IConsoleCommand) commands.get(command);
      try {
View Full Code Here

        String command = ((String) comargs.get(0)).toLowerCase();
        if( ".".equals(command) )
        {
          if (oldcommand != null) {
            comargs.clear();
            comargs.addAll(oldcommand);
            command = ((String) comargs.get(0)).toLowerCase();
          } else {
            out.println("No old command. Remove commands are not repeated to prevent errors");
          }
        }
View Full Code Here

    }

    public List getAppenders() {
        List appenders = new ArrayList();
        try {
            appenders.addAll(getRootLogger().getAppenders());

            Class clazz = (Class) getTarget();
            Method m = MethodUtils.getAccessibleMethod(clazz, "getCurrentLoggers", new Class[]{});
            Enumeration e = (Enumeration) m.invoke(null, null);
            while (e.hasMoreElements()) {
View Full Code Here

            while (e.hasMoreElements()) {
                Log4JLoggerAccessor accessor = new Log4JLoggerAccessor();
                accessor.setTarget(e.nextElement());
                accessor.setApplication(getApplication());

                appenders.addAll(accessor.getAppenders());
            }
        } catch (Exception e) {
            log.error(getTarget() + ".getCurrentLoggers() failed", e);
        }
        return appenders;
View Full Code Here

            Enumeration e = (Enumeration) MethodUtils.invokeMethod(getTarget(), "getLoggerNames", null);
            while (e.hasMoreElements()) {
                String name = (String) e.nextElement();
                Jdk14LoggerAccessor accessor = getLogger(name);

                allHandlers.addAll(accessor.getHandlers());
            }
        } catch (Exception e) {
            log.error(getTarget() + ".getLoggerNames() failed", e);
        }
        return allHandlers;
View Full Code Here

            }

            if (sessionMatches && searchInfo.isUseAttrName()) {
                boolean attrMatches = false;
                List a = new ArrayList();
                a.addAll(searchInfo.getAttrNamePatterns());

                for (Iterator i = appSession.getAttributes().iterator(); i.hasNext();) {
                    String attrName = ((Attribute) i.next()).getName();

                    if (attrName != null) {
View Full Code Here

  public List format_photo_months(List months){
    if(months==null)
      return null;
    List new_months = new ArrayList();
    if(months.size()>0){
      new_months.addAll(months);
      final SimpleDateFormat month_fm = new SimpleDateFormat("MMM yyyy", request.getLocale());
      Calendar time = Calendar.getInstance();
      for(int i=0;i<new_months.size();i++){
        int value = ((Integer)new_months.get(i)).intValue();
        time.set(Calendar.YEAR, value / 100);
View Full Code Here

      Statement stmnt = (Statement) stmtIter.next();
      Object newStmt = rewriteStatement(stmnt);
      if(newStmt instanceof Statement) {
        newStmts.add(newStmt);
      } else if (newStmt instanceof List) {
          newStmts.addAll((List)newStmt);
            }
        }

        block.setStatements(newStmts);
View Full Code Here

      //rewrite join crits by rewriting a compound criteria
      Criteria criteria = new CompoundCriteria(new ArrayList(joinCrits));
            joinCrits.clear();
            criteria = rewriteCriteria(criteria);
            if (criteria instanceof CompoundCriteria && ((CompoundCriteria)criteria).getOperator() == CompoundCriteria.AND) {
                joinCrits.addAll(((CompoundCriteria)criteria).getCriteria());
            } else {
                joinCrits.add(criteria);
            }
      predicate.setJoinCriteria(joinCrits);
    }
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.