Idea中用来遍历list集合的快捷键
作者:互联网
使用Intellij idea时,想要快捷生成for循环代码块:
itar 生成array for代码块
for (int i = 0; i < array.length; i++) { = array[i]; }
itco生成Collection迭代
for (Iterator<String> iterator = locationUrl.iterator(); iterator.hasNext(); ) { String next = iterator.next(); }
iten生成enumeration遍历
while (enumeration.hasMoreElements()) { Object nextElement = enumeration.nextElement(); }
iter生成增强for
for (String s : locationUrl) { }
itit生成iterator迭代
while (iterator.hasNext()) { Object next = iterator.next(); }
itli生成list的遍历
for (int i = 0; i < locationUrl.size(); i++) { String s = locationUrl.get(i); }
ittok生成String token遍历
for (StringTokenizer stringTokenizer = new StringTokenizer(TVSOU_URL); stringTokenizer.hasMoreTokens(); ) { String s = stringTokenizer.nextToken(); }
itve生成Vector数组迭代
for (int i = 0; i < vector.size(); i++) { Object elementAt = vector.elementAt(i); }
标签:locationUrl,String,iterator,list,Idea,生成,next,遍历,快捷键 来源: https://www.cnblogs.com/qingmuchuanqi48/p/11260834.html