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 void
addAlias(String alias, String originalName)
String
get(String key)
Map<String,String>
getAll()
Returns a copy of the source map.void
put(String key, String value)
void
putAll(Map<String,String> fromMap)
Allows to add map of parameters into the backing mapString
remove(String key)
int
size()
Returns the number of parameters in this parameters provider.String
toString()
-
-
-
Constructor Detail
-
AliasParametersProvider
public AliasParametersProvider(MapParametersProvider source)
-
-
Method Detail
-
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 interfaceParametersProvider
-
getAll
public Map<String,String> getAll()
Returns a copy of the source map. Note that the aliased values are not included.- Specified by:
getAll
in interfaceParametersProvider
- Returns:
- a copy of the source map
-
get
public String get(@NotNull String key)
- Specified by:
get
in 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:
put
in interfaceMapParametersProvider
-
remove
@Nullable public String remove(@NotNull String key)
- Specified by:
remove
in interfaceMapParametersProvider
-
putAll
public void putAll(@NotNull Map<String,String> fromMap)
Description copied from interface:MapParametersProvider
Allows to add map of parameters into the backing map- Specified by:
putAll
in interfaceMapParametersProvider
- Parameters:
fromMap
- the map to copy parameters from
-
-