title: An adjustable/variable switch case in java
body: <p>I have a lot of methods that look like the following:</p>
  
  <pre><code>switch(myEnum) {
      case a :
      case b :
      case c :
      case d :
          modifier = 1.1;
          break;
      default :
          break;
  }
  </code></pre>
  
  <p>It would be perfect if i had the opportunity to make every case and the modifier variable, so i can have one method with 6 parameters, 4 for the cases and 2 for the modifier. Something like the following (pseudo):</p>
  
  <pre><code>public void setModifier(case1, case2, case3, case4, modifier, value) {
      switch(myEnum) {
          case case1 :
          case case2 :
          case case3 :
          case case4 :
              modifier = value;
              break;
          default :
              break;
      }
  }
  </code></pre>
  
  <p>modifier and value shouldnt be a problem, but how do i solve the variable switch cases? Is this even possible in java with a switch-statement?</p>