uk.ac.starlink.ttools.plot2.config
Class LoggingConfigMap

java.lang.Object
  extended by uk.ac.starlink.ttools.plot2.config.ConfigMap
      extended by uk.ac.starlink.ttools.plot2.config.LoggingConfigMap

public class LoggingConfigMap
extends ConfigMap

ConfigMap wrapper that issues a logging message for each item that is queried. Only the first query for each key is logged.

Since:
14 Sep 2013
Author:
Mark Taylor

Constructor Summary
LoggingConfigMap(ConfigMap base, Level level)
          Constructor.
 
Method Summary
<T> T
get(ConfigKey<T> key)
          Reads the value associated with a given key.
 
Methods inherited from class uk.ac.starlink.ttools.plot2.config.ConfigMap
equals, hashCode, keySet, put, putAll, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LoggingConfigMap

public LoggingConfigMap(ConfigMap base,
                        Level level)
Constructor.

Parameters:
base - base configmap
level - level at which logging messages will be issued
Method Detail

get

public <T> T get(ConfigKey<T> key)
Description copied from class: ConfigMap
Reads the value associated with a given key. If the key is not present in the map, the default value for that key is returned.

Overrides:
get in class ConfigMap
Parameters:
key - key
Returns:
value earlier written to map, or default value


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.