package de.bmoth.app;

public class BMothPreferences {
    private static java.util.prefs.Preferences prefs = java.util.prefs.Preferences.userNodeForPackage(BMothPreferences.class);

    static String getStringPreference(StringPreference p) {
        return prefs.get(p.toString(), p.defaultValue);
    }

    static void setStringPreference(StringPreference p, String val) {
        prefs.put(p.toString(), val);
    }

    static boolean getBooleanPreference(BooleanPreference p) {
        return prefs.getBoolean(p.toString(), p.defaultValue);
    }

    static void setBooleanPreference(BooleanPreference p, boolean val) {
        prefs.put(p.toString(), String.valueOf(val));
    }

    static int getIntPreference(IntPreference p) {
        return prefs.getInt(p.toString(), p.defaultValue);
    }

    static void setIntPreference(IntPreference p, String val) {
        prefs.put(p.toString(), val);
    }

    enum StringPreference {
        LAST_FILE(""), LAST_DIR(System.getProperty("user.dir"));

        private String defaultValue;

        StringPreference(String defaultValue) {
            this.defaultValue = defaultValue;
        }
    }


    enum IntPreference {
        MIN_INT(-1), MAX_INT(3), MAX_INITIAL_STATE(5), MAX_TRANSITIONS(5), Z3_TIMEOUT(5000);

        private int defaultValue;

        IntPreference(int defaultValue) {
            this.defaultValue = defaultValue;
        }
    }

    enum BooleanPreference {
        INVARIANT_CHECK(true), MODEL_CHECK(true), INITIAL_CHECK(true);

        private boolean defaultValue;

        BooleanPreference(boolean defaultValue) {
            this.defaultValue = defaultValue;
        }
    }
}

@@ -176,24 +176,31 @@
 lass);%0A%0A    
+public 
 static Strin
@@ -302,32 +302,39 @@
 ue);%0A    %7D%0A%0A    
+public 
 static void setS
@@ -428,24 +428,31 @@
 %0A    %7D%0A%0A    
+public 
 static boole
@@ -564,32 +564,39 @@
 ue);%0A    %7D%0A%0A    
+public 
 static void setB
@@ -709,24 +709,31 @@
 %0A    %7D%0A%0A    
+public 
 static int g
@@ -837,16 +837,23 @@
  %7D%0A%0A    
+public 
 static v
@@ -949,24 +949,31 @@
 %0A    %7D%0A%0A    
+public 
 enum StringP
@@ -1200,24 +1200,31 @@
     %7D%0A%0A%0A    
+public 
 enum IntPref
@@ -1470,16 +1470,23 @@
  %7D%0A%0A    
+public 
 enum Boo

fix access