?? nilenumeration.java
字號:
package org.codehaus.classloader;
import java.util.Enumeration;
import java.util.NoSuchElementException;
/**
* An implementation of Enumeration that is empty.
* <p>
* @author Ben Yu
* Aug 1, 2006 5:06:27 PM
*/
public final class NilEnumeration implements Enumeration {
public boolean hasMoreElements() {
return false;
}
public Object nextElement() {
throw new NoSuchElementException();
}
private NilEnumeration(){}
private static NilEnumeration singleton = new NilEnumeration();
/**
* Get an instance of empty enumeration.
*/
public static Enumeration instance(){
return singleton;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -