mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-09 13:21:51 +09:00
Former-commit-id: 1647fa32ef6894bd7db44f741f07c2f4dcdf9054 Former-commit-id: 0e5810dcfbe1fd59b13e7cabe9f1e93c5542da2d
30 lines
773 B
Java
30 lines
773 B
Java
package org.newdawn.slick.muffin;
|
|
|
|
import java.io.IOException;
|
|
import java.util.HashMap;
|
|
|
|
/**
|
|
* A description of any class with the ability to store state locally
|
|
*
|
|
* @author kappaOne
|
|
*/
|
|
public interface Muffin {
|
|
/**
|
|
* Save a file of data
|
|
*
|
|
* @param data The data to store
|
|
* @param fileName The name of the file to store it against
|
|
* @throws IOException Indicates a failure to save the state
|
|
*/
|
|
public abstract void saveFile(HashMap data, String fileName) throws IOException;
|
|
|
|
/**
|
|
* Load a file of data from the store
|
|
*
|
|
* @param fileName The name of the file to retrieve
|
|
* @return The data retrieved
|
|
* @throws IOException Indicates a failure to load the state
|
|
*/
|
|
public abstract HashMap loadFile(String fileName) throws IOException;
|
|
}
|