Class AliasParametersProvider
- java.lang.Object
-
- jetbrains.buildServer.parameters.impl.AliasParametersProvider
-
- All Implemented Interfaces:
MapParametersProvider,ParametersProvider
public class AliasParametersProvider extends Object implements MapParametersProvider
Allows to find a parameter by both its original key and alias key.- Author:
- Yegor.Yarko Date: 09.06.2008
-
-
Constructor Summary
Constructors Constructor Description AliasParametersProvider(MapParametersProvider source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAlias(String alias, String originalName)Stringget(String key)Map<String,String>getAll()Returns a copy of the source map.voidput(String key, String value)voidputAll(Map<String,String> fromMap)Allows to add map of parameters into the backing mapStringremove(String key)intsize()Returns the number of parameters in this parameters provider.StringtoString()
-
-
-
Constructor Detail
-
AliasParametersProvider
public AliasParametersProvider(MapParametersProvider source)
-
-
Method Detail
-
size
public int size()
Description copied from interface:ParametersProviderReturns the number of parameters in this parameters provider. This is the size of the map returned by getAll method.- Specified by:
sizein interfaceParametersProvider
-
getAll
public Map<String,String> getAll()
Returns a copy of the source map. Note that the aliased values are not included.- Specified by:
getAllin interfaceParametersProvider- Returns:
- a copy of the source map
-
get
public String get(@NotNull String key)
- Specified by:
getin interfaceParametersProvider- Parameters:
key- the name of the parameter- Returns:
- value from the backed map corresponding to the key, or (if not found) corresponding to alias of the key.
-
put
public void put(@NotNull String key, @NotNull String value)- Specified by:
putin interfaceMapParametersProvider
-
remove
@Nullable public String remove(@NotNull String key)
- Specified by:
removein interfaceMapParametersProvider
-
putAll
public void putAll(@NotNull Map<String,String> fromMap)Description copied from interface:MapParametersProviderAllows to add map of parameters into the backing map- Specified by:
putAllin interfaceMapParametersProvider- Parameters:
fromMap- the map to copy parameters from
-
-