idea 中各种循环的快捷键

idea中一些自动生成循环的快捷键,比较方便 

//itar 自动生成 array_for 循环
        for (int i = 0; i < args.length; i++) {
            String arg = args[i];

        }

        //itco 自动生成Collection 迭代
        for (Iterator iterator = users.iterator(); iterator.hasNext(); ) {
            User next =  iterator.next();

        }

        //iten 自动生成enumeration遍历
        while (enumeration.hasMoreElements()) {
            Object nextElement =  enumeration.nextElement();

        }

        //iter 自动生成增强for 循环
        for (User user : users) {

        }

        //itit 自动生成iterator 迭代
        while (iterator.hasNext()) {
            Object next =  iterator.next();

        }

        //itli 自动生成List的遍历
        for (int i = 0; i < users.size(); i++) {
            User user =  users.get(i);

        }

        //ittok 自动生成String token遍历
        for (StringTokenizer stringTokenizer = new StringTokenizer(); stringTokenizer.hasMoreTokens(); ) {
            String s = stringTokenizer.nextToken();

        }

        //itve 自动生成Vector数组迭代
        for (int i = 0; i < vector.size(); i++) {
            Object elementAt =  vector.elementAt(i);

        }

 

你可能感兴趣的:(idea 中各种循环的快捷键)