Class MapContextVariablesImpl
- java.lang.Object
-
- jetbrains.buildServer.parameters.impl.MapContextVariablesImpl
-
- All Implemented Interfaces:
ContextVariables,MapContextVariables
public class MapContextVariablesImpl extends Object implements MapContextVariables
- Author:
- Yegor.Yarko Date: 24.08.2008
-
-
Constructor Summary
Constructors Constructor Description MapContextVariablesImpl()Creates empty variables provider.MapContextVariablesImpl(Map<String,Object> variables)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectget(String name)Map<String,Object>getAll()Objectput(String name, Object value)Adds a variable to the backing mapvoidputAll(Map<String,Object> fromMap)Adds multiple variables to the backing mapObjectremove(String name)Removes variable with the name from the backing mapintsize()Returns the number of variables in this variables provider.StringtoString()
-
-
-
Method Detail
-
get
@Nullable public Object get(@NotNull String name)
- Specified by:
getin interfaceContextVariables- Specified by:
getin interfaceMapContextVariables- Parameters:
name- the name of the variable- Returns:
- the variable stored or null is the variable with the name cannot be found.
-
remove
public Object remove(@NotNull String name)
Description copied from interface:MapContextVariablesRemoves variable with the name from the backing map- Specified by:
removein interfaceMapContextVariables- Parameters:
name- name of the variable to be removed- Returns:
- previous value associated with specified name, or null if there was no mapping for name.
-
put
@Nullable public Object put(@NotNull String name, @NotNull Object value)
Description copied from interface:MapContextVariablesAdds a variable to the backing map- Specified by:
putin interfaceMapContextVariables- Parameters:
name- name of the variable to addvalue- value of the variable- Returns:
- previous value associated with specified name, or null if there was no mapping for name
-
putAll
public void putAll(Map<String,Object> fromMap)
Description copied from interface:MapContextVariablesAdds multiple variables to the backing map- Specified by:
putAllin interfaceMapContextVariables- Parameters:
fromMap- the map to add variables form
-
size
public int size()
Description copied from interface:ContextVariablesReturns the number of variables in this variables provider. This is the size of the map returned by getAll method.- Specified by:
sizein interfaceContextVariables- Specified by:
sizein interfaceMapContextVariables- Returns:
- the size of the backing map
-
getAll
@NotNull public Map<String,Object> getAll()
- Specified by:
getAllin interfaceContextVariables- Specified by:
getAllin interfaceMapContextVariables- Returns:
- a copy of the backing map
-
-