src/org/sonews/config/CommandLineConfig.java
changeset 37 74139325d305
parent 35 ed84c8bdd87b
child 49 8df94bfd3e2f
     1.1 --- a/src/org/sonews/config/CommandLineConfig.java	Sun Aug 29 17:43:58 2010 +0200
     1.2 +++ b/src/org/sonews/config/CommandLineConfig.java	Sun Aug 29 18:17:37 2010 +0200
     1.3 @@ -28,37 +28,34 @@
     1.4  class CommandLineConfig extends AbstractConfig
     1.5  {
     1.6  
     1.7 -  private static final CommandLineConfig instance = new CommandLineConfig();
     1.8 +	private static final CommandLineConfig instance = new CommandLineConfig();
     1.9  
    1.10 -  public static CommandLineConfig getInstance()
    1.11 -  {
    1.12 -    return instance;
    1.13 -  }
    1.14 +	public static CommandLineConfig getInstance()
    1.15 +	{
    1.16 +		return instance;
    1.17 +	}
    1.18 +	private final Map<String, String> values = new HashMap<String, String>();
    1.19  
    1.20 -  private final Map<String, String> values = new HashMap<String, String>();
    1.21 -  
    1.22 -  private CommandLineConfig() {}
    1.23 +	private CommandLineConfig()
    1.24 +	{
    1.25 +	}
    1.26  
    1.27 -  @Override
    1.28 -  public String get(String key, String def)
    1.29 -  {
    1.30 -    synchronized(this.values)
    1.31 -    {
    1.32 -      if(this.values.containsKey(key))
    1.33 -      {
    1.34 -        def = this.values.get(key);
    1.35 -      }
    1.36 -    }
    1.37 -    return def;
    1.38 -  }
    1.39 +	@Override
    1.40 +	public String get(String key, String def)
    1.41 +	{
    1.42 +		synchronized (this.values) {
    1.43 +			if (this.values.containsKey(key)) {
    1.44 +				def = this.values.get(key);
    1.45 +			}
    1.46 +		}
    1.47 +		return def;
    1.48 +	}
    1.49  
    1.50 -  @Override
    1.51 -  public void set(String key, String val)
    1.52 -  {
    1.53 -    synchronized(this.values)
    1.54 -    {
    1.55 -      this.values.put(key, val);
    1.56 -    }
    1.57 -  }
    1.58 -
    1.59 +	@Override
    1.60 +	public void set(String key, String val)
    1.61 +	{
    1.62 +		synchronized (this.values) {
    1.63 +			this.values.put(key, val);
    1.64 +		}
    1.65 +	}
    1.66  }