title: Stop a chain of methods without returning booleans
body: <p>I have not doubt that there is a solution posted for this, but I can't find the search term retrieve it, so if it does exist please point me to the duplicate and mark this as such.</p>
  
  <p>I have a chain of methods performing various validation checks on a button click event, I display a message if the validation has failed, currently my solution is to then pass back a boolean so that if the method failed the remaining methods will not run.</p>
  
  <p>I don't like this, when I have several methods all passing back booleans my code starts to smell.</p>
  
  <p>is there a better solution to this? (I'd don't want to use a instance variable) </p>
  
  <p>Example of the code as it currently stands:</p>
  
  <pre><code>private void SUBMIT_BUTTON_CLICK(){
  
          if(validate()){
  
          //Do Stuff
  
      }
  }
  
  private boolean validate(){
  
      return checkOne() &amp;&amp; checkTow() &amp;&amp; checkThree() &amp;&amp; checkFour();
  
  }
  
  private boolean checkOne(){
  
      if (someCheckFails) {
  
          print(warning);
          return false;
  
      } else {
          return true;
      }
  }
  
  private boolean checkTow(){
  
      if (someCheckFails) {
  
          print(warning);
          return false;
  
      } else {
          return true;
      }
  
  }
  
  private boolean checkThree(){
  
      if (someCheckFails) {
  
          print(warning);
          return false;
  
      } else {
          return true;
      }
  }
  
  private boolean checkFour(){
  
      if (someCheckFails) {
  
          print(warning);
          return false;
  
      } else {
          return true;
      }
  }
  </code></pre>