jetbrains.buildServer.parameters.impl
Class DelegatingParametersProvider

java.lang.Object
  extended by jetbrains.buildServer.parameters.impl.DelegatingParametersProvider
All Implemented Interfaces:
ParametersProvider

public class DelegatingParametersProvider
extends java.lang.Object
implements ParametersProvider

Parameters Provider implementation that delegates to a given map. This is recommended to ensure map is not changed outside.

Since:
7.0
Author:
Eugene Petrenko (eugene.petrenko@gmail.com) Date: 14.09.11 14:01

Constructor Summary
DelegatingParametersProvider(java.util.Map<java.lang.String,java.lang.String> map)
           
 
Method Summary
 java.lang.String get(java.lang.String key)
           
 java.util.Map<java.lang.String,java.lang.String> getAll()
          Allows to get map of the provided parameters.
 int size()
          Returns the number of parameters in this parameters provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingParametersProvider

public DelegatingParametersProvider(@NotNull
                                    java.util.Map<java.lang.String,java.lang.String> map)
Method Detail

get

public java.lang.String get(@NotNull
                            java.lang.String key)
Specified by:
get in interface ParametersProvider
Parameters:
key - the name of the parameter
Returns:
the value associated with a key, or null if the parameter with the key cannot be found.

size

public int size()
Description copied from interface: ParametersProvider
Returns the number of parameters in this parameters provider. This is the size of the map returned by getAll method.

Specified by:
size in interface ParametersProvider

getAll

public java.util.Map<java.lang.String,java.lang.String> getAll()
Description copied from interface: ParametersProvider
Allows to get map of the provided parameters. Note that get method can provide more parameters then are returned by this method. However, all the parameters returned by this method should also be available via get method.

Specified by:
getAll in interface ParametersProvider
Returns:
copy of the backed data