com.cloudbees.api.config
Class ParameterMap

java.lang.Object
  extended by java.util.AbstractMap<String,String>
      extended by com.cloudbees.api.config.ParameterMap
All Implemented Interfaces:
Map<String,String>

public abstract class ParameterMap
extends AbstractMap<String,String>

String-to-string map, with lots of type converters for values and other convenience methods.

Author:
Kohsuke Kawaguchi

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
ParameterMap()
           
 
Method Summary
 boolean getBoolean(String key, boolean defaultValue)
          Gets the configuration value as a boolean.
 double getDouble(String key, double defaultValue)
           
 int getInt(String key, int defaultValue)
           
 void putBoolean(String key, boolean value)
           
 void putDouble(String key, double value)
           
 void putInt(String key, int value)
           
 
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParameterMap

public ParameterMap()
Method Detail

getInt

public int getInt(String key,
                  int defaultValue)
           throws NumberFormatException
Throws:
NumberFormatException

putInt

public void putInt(String key,
                   int value)

getBoolean

public boolean getBoolean(String key,
                          boolean defaultValue)
Gets the configuration value as a boolean. The expected string representation is "true" or "false". Anything else will be treated as "false".


putBoolean

public void putBoolean(String key,
                       boolean value)

getDouble

public double getDouble(String key,
                        double defaultValue)
                 throws NumberFormatException
Throws:
NumberFormatException

putDouble

public void putDouble(String key,
                      double value)


Copyright © 2011-2013. All Rights Reserved.