?? niliterator.java
字號:
package org.codehaus.classloader;
import java.util.Iterator;
import java.util.NoSuchElementException;
/**
* This is an empty implementation of Iterator.
* <p>
* @author Ben Yu
* Aug 4, 2006 12:19:53 PM
*/
public final class NilIterator implements Iterator {
private NilIterator(){}
private static NilIterator singleton = new NilIterator();
/**
* Get an instance of this implementation.
*/
public static Iterator instance(){
return singleton;
}
public boolean hasNext() {
return false;
}
public Object next() {
throw new NoSuchElementException();
}
public void remove() {
throw new UnsupportedOperationException();
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -