📄 gmstorage.java
字号:
package siuying.gm.app.gmailer4j;
import java.util.*;
import siuying.gm.structure.*;
import java.io.*;
/**
* GMStorage
* Interface that defines method to store data object
* different method of storage can be implemented
*/
public interface GMStorage{
/**
* set the url/identifer of the storage
* depends on implementation
*/
public void setUrl(String url) throws NullPointerException;
/**
* open a storage
*/
public void open() throws IOException ;
/**
* close a storage
*/
public void close();
/**
* if an item is in storage
*/
public boolean containsId(String id) throws NullPointerException;
/**
*get an Object from storage
*/
public Object get(String id) throws IOException, NullPointerException;
/**
* store an Object to storage
*/
public void put(String id, Object item) throws IOException, NullPointerException ;
/**
* remove a thread from storage
*/
public void remove(String id) throws IOException, NullPointerException ;
/**
* flush the storage, force save the change permanently
*/
public void flush() throws IOException ;
/**
* iterate through the threads in storage
*/
public Iterator iterator();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -