title: Prohibiting passing certain values for method parameters
body: <p>I have a method like this:</p>
  
  <pre><code>void method(int number){some code}
  </code></pre>
  
  <p>and i will call it like this:</p>
  
  <pre><code>method(-1)
  </code></pre>
  
  <p>is there a way in java to only allow passing positive integers to number parameter other than checking in the method body or making a checked exception?</p>