Refactor preferences with interface
This commit is contained in:
parent
c86c04bd42
commit
9b5c865823
@ -35,7 +35,7 @@ import info.openrocket.core.util.MathUtil;
|
|||||||
import info.openrocket.core.util.StateChangeListener;
|
import info.openrocket.core.util.StateChangeListener;
|
||||||
import info.openrocket.core.util.UniqueID;
|
import info.openrocket.core.util.UniqueID;
|
||||||
|
|
||||||
public abstract class ORPreferences implements ChangeSource {
|
public abstract class ORPreferences implements ChangeSource, Preferences {
|
||||||
private static final String SPLIT_CHARACTER = "|";
|
private static final String SPLIT_CHARACTER = "|";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
package info.openrocket.core.preferences;
|
||||||
|
|
||||||
|
public interface Preferences {
|
||||||
|
boolean getBoolean(String key, boolean defaultValue);
|
||||||
|
|
||||||
|
void putBoolean(String key, boolean value);
|
||||||
|
|
||||||
|
int getInt(String key, int defaultValue);
|
||||||
|
|
||||||
|
void putInt(String key, int value);
|
||||||
|
|
||||||
|
double getDouble(String key, double defaultValue);
|
||||||
|
|
||||||
|
void putDouble(String key, double value);
|
||||||
|
|
||||||
|
String getString(String key, String defaultValue);
|
||||||
|
|
||||||
|
void putString(String key, String value);
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user