You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by fs...@apache.org on 2017/07/23 14:16:10 UTC

svn commit: r1802729 - /jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterVariables.java

Author: fschumacher
Date: Sun Jul 23 14:16:10 2017
New Revision: 1802729

URL: http://svn.apache.org/viewvc?rev=1802729&view=rev
Log:
Added javadoc

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterVariables.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterVariables.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterVariables.java?rev=1802729&r1=1802728&r2=1802729&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterVariables.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/threads/JMeterVariables.java Sun Jul 23 14:16:10 2017
@@ -44,6 +44,9 @@ public class JMeterVariables {
       "TESTSTART.MS", // $NON-NLS-1$
     };
 
+    /**
+     * Constructor, that preloads the variables from the JMeter properties
+     */
     public JMeterVariables() {
         preloadVariables();
     }
@@ -57,14 +60,23 @@ public class JMeterVariables {
         }
     }
 
+    /**
+     * @return the name of the currently running thread 
+     */
     public String getThreadName() {
         return Thread.currentThread().getName();
     }
 
+    /**
+     * @return the current number of iterations
+     */
     public int getIteration() {
         return iteration;
     }
 
+    /**
+     * Increase the current number of iterations
+     */
     public void incIteration() {
         iteration++;
     }
@@ -100,10 +112,18 @@ public class JMeterVariables {
         variables.put(key, value);
     }
 
+    /**
+     * Updates the variables with all entries found in the {@link Map} {@code vars}
+     * @param vars map with the entries to be updated
+     */
     public void putAll(Map<String, ?> vars) {
         variables.putAll(vars);
     }
 
+    /**
+     * Updates the variables with all entries found in the variables in {@code vars}
+     * @param vars {@link JMeterVariables} with the entries to be updated
+     */
     public void putAll(JMeterVariables vars) {
         putAll(vars.variables);
     }
@@ -138,6 +158,9 @@ public class JMeterVariables {
     }
 
     // Used by DebugSampler
+    /**
+     * @return an unmodifiable view of the entries contained in {@link JMeterVariables}
+     */
     public Set<Entry<String, Object>> entrySet(){
         return Collections.unmodifiableMap(variables).entrySet();
     }