diff -r ed84c8bdd87b -r 7f84f4de2893 src/org/sonews/config/AbstractConfig.java --- a/src/org/sonews/config/AbstractConfig.java Sun Aug 29 17:28:58 2010 +0200 +++ b/src/org/sonews/config/AbstractConfig.java Mon Jun 06 20:12:21 2011 +0200 @@ -23,35 +23,34 @@ * @author Christian Lins * @since sonews/0.5.0 */ -public abstract class AbstractConfig +public abstract class AbstractConfig { - - public abstract String get(String key, String defVal); - - public int get(final String key, final int defVal) - { - return Integer.parseInt( - get(key, Integer.toString(defVal))); - } - - public boolean get(String key, boolean defVal) - { - String val = get(key, Boolean.toString(defVal)); - return Boolean.parseBoolean(val); - } - /** - * Returns a long config value specified via the given key. - * @param key - * @param defVal - * @return - */ - public long get(String key, long defVal) - { - String val = get(key, Long.toString(defVal)); - return Long.parseLong(val); - } + public abstract String get(String key, String defVal); - protected abstract void set(String key, String val); - + public int get(final String key, final int defVal) + { + return Integer.parseInt( + get(key, Integer.toString(defVal))); + } + + public boolean get(String key, boolean defVal) + { + String val = get(key, Boolean.toString(defVal)); + return Boolean.parseBoolean(val); + } + + /** + * Returns a long config value specified via the given key. + * @param key + * @param defVal + * @return + */ + public long get(String key, long defVal) + { + String val = get(key, Long.toString(defVal)); + return Long.parseLong(val); + } + + protected abstract void set(String key, String val); }