src/org/sonews/config/Config.java
changeset 56 c713ca00a4a7
parent 45 7e24949b87b0
child 58 b2df305a13ce
     1.1 --- a/src/org/sonews/config/Config.java	Sat Sep 10 18:18:05 2011 +0200
     1.2 +++ b/src/org/sonews/config/Config.java	Tue Sep 13 19:08:15 2011 +0200
     1.3 @@ -15,7 +15,6 @@
     1.4   *   You should have received a copy of the GNU General Public License
     1.5   *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
     1.6   */
     1.7 -
     1.8  package org.sonews.config;
     1.9  
    1.10  /**
    1.11 @@ -23,8 +22,7 @@
    1.12   * @author Christian Lins
    1.13   * @since sonews/1.0
    1.14   */
    1.15 -public class Config extends AbstractConfig
    1.16 -{
    1.17 +public class Config extends AbstractConfig {
    1.18  
    1.19  	public static final int LEVEL_CLI = 1;
    1.20  	public static final int LEVEL_FILE = 2;
    1.21 @@ -91,18 +89,15 @@
    1.22  	};
    1.23  	private static Config instance = new Config();
    1.24  
    1.25 -	public static Config inst()
    1.26 -	{
    1.27 +	public static Config inst() {
    1.28  		return instance;
    1.29  	}
    1.30  
    1.31 -	private Config()
    1.32 -	{
    1.33 +	private Config() {
    1.34  	}
    1.35  
    1.36  	@Override
    1.37 -	public String get(String key, String def)
    1.38 -	{
    1.39 +	public String get(String key, String def) {
    1.40  		String val = CommandLineConfig.getInstance().get(key, null);
    1.41  
    1.42  		if (val == null) {
    1.43 @@ -116,8 +111,7 @@
    1.44  		return val;
    1.45  	}
    1.46  
    1.47 -	public String get(int maxLevel, String key, String def)
    1.48 -	{
    1.49 +	public String get(int maxLevel, String key, String def) {
    1.50  		String val = CommandLineConfig.getInstance().get(key, null);
    1.51  
    1.52  		if (val == null && maxLevel >= LEVEL_FILE) {
    1.53 @@ -131,13 +125,11 @@
    1.54  	}
    1.55  
    1.56  	@Override
    1.57 -	public void set(String key, String val)
    1.58 -	{
    1.59 +	public void set(String key, String val) {
    1.60  		set(LEVEL_BACKEND, key, val);
    1.61  	}
    1.62  
    1.63 -	public void set(int level, String key, String val)
    1.64 -	{
    1.65 +	public void set(int level, String key, String val) {
    1.66  		switch (level) {
    1.67  			case LEVEL_CLI: {
    1.68  				CommandLineConfig.getInstance().set(key, val);