jetbrains.buildServer.parameters.impl
Interface MapContextVariables

All Superinterfaces:
ContextVariables
All Known Implementing Classes:
MapContextVariablesImpl

public interface MapContextVariables
extends ContextVariables

Variables provider backed by a map of name-value pairs

Author:
Yegor.Yarko Date: 25.08.2008

Method Summary
 java.lang.Object get(java.lang.String name)
           
 java.util.Map<java.lang.String,java.lang.Object> getAll()
           
 java.lang.Object put(java.lang.String name, java.lang.Object value)
          Adds a variable to the backing map
 void putAll(java.util.Map<java.lang.String,java.lang.Object> fromMap)
          Adds multiple variables to the backing map
 java.lang.Object remove(java.lang.String name)
          Removes variable with the name from the backing map
 int size()
          Returns the number of variables in this variables provider.
 

Method Detail

get

@Nullable
java.lang.Object get(@NotNull
                              java.lang.String name)
Specified by:
get in interface ContextVariables
Parameters:
name - the name of the variable
Returns:
the variable stored or null is the variable with the name cannot be found.

remove

java.lang.Object remove(@NotNull
                        java.lang.String name)
Removes variable with the name from the backing map

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
java.lang.Object put(@NotNull
                              java.lang.String name,
                              @NotNull
                              java.lang.Object value)
Adds a variable to the backing map

Parameters:
name - name of the variable to add
value - value of the variable
Returns:
revious value associated with specified name, or null if there was no mapping for name

putAll

void putAll(java.util.Map<java.lang.String,java.lang.Object> fromMap)
Adds multiple variables to the backing map

Parameters:
fromMap - the map to add variables form

size

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

Specified by:
size in interface ContextVariables
Returns:
the size of the backing map

getAll

@NotNull
java.util.Map<java.lang.String,java.lang.Object> getAll()
Specified by:
getAll in interface ContextVariables
Returns:
a copy of the backing map