title: How can I alternate between method calls?
body: <p>I want to call two methods, but I want to call only one of them at a time.</p>
  <p>The next time I want to call the one that was'nt called before, kind of a <em>Round Robin</em> technique</p>
  <p>Example:</p>
  <pre class="lang-java prettyprint-override"><code>void mainMethod() {
      Obj val;
  
      if (somthing)
          val = implMethod1();
      else {
          val = implMethod2();
      }
  }
  </code></pre>
  <p>Using a if-statement is something that can be done.
  But is there any <em>out of the box</em> thing that I can use to achieve the same?</p>