@Test (expected = IllegalStateException.class) public void testGetNotExistentOption () { Config.get("test", "not-existent-key"); }
public static String get (String section, String key) { String option = section + "." + key; if (!values.containsKey(option)) { throw new IllegalStateException("Config key '" + option + "' doesn't exists!"); } return values.get(option); }
Config { public static String get (String section, String key) { String option = section + "." + key; if (!values.containsKey(option)) { throw new IllegalStateException("Config key '" + option + "' doesn't exists!"); } return values.get(option); } }
Config { public static String get (String section, String key) { String option = section + "." + key; if (!values.containsKey(option)) { throw new IllegalStateException("Config key '" + option + "' doesn't exists!"); } return values.get(option); } protected  Config(); }
Config { public static String get (String section, String key) { String option = section + "." + key; if (!values.containsKey(option)) { throw new IllegalStateException("Config key '" + option + "' doesn't exists!"); } return values.get(option); } protected  Config(); static void load(File file); static void load(File file, boolean skipExampleConfig); static void loadDir(File dir); static String get(String section, String key); static String getOrDefault(String section, String key, String defaultValue); static boolean getBool(String section, String key); static int getInt(String section, String key); static float getFloat(String section, String key); static void set(String section, String key, String value); static void reload(); static void clear(); }
Config { public static String get (String section, String key) { String option = section + "." + key; if (!values.containsKey(option)) { throw new IllegalStateException("Config key '" + option + "' doesn't exists!"); } return values.get(option); } protected  Config(); static void load(File file); static void load(File file, boolean skipExampleConfig); static void loadDir(File dir); static String get(String section, String key); static String getOrDefault(String section, String key, String defaultValue); static boolean getBool(String section, String key); static int getInt(String section, String key); static float getFloat(String section, String key); static void set(String section, String key, String value); static void reload(); static void clear(); static boolean forceExit; }