title: Java check if number in interval
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/724575/does-an-open-ended-interval-implementation-exist-for-java">Does an open-ended interval implementation exist for Java?</a>  </p>
  </blockquote>
  
  
  
  <p>i have an int variable and i'd like to check if it's value is in an interval [a,b]. I know it's a simple matter of using x>=a and x&lt;=b or implementing a simple method which can do this, but i'd like to know if there is something already done. Searched in Math class, but i wasn't able to find one. It's not that important and not that big of an issue, but i'm curious if there is something like this, so i can use it instead of implementing my own :)</p>
  
  <p>In all my coding i haven't come across a method like this. Maybe one of you java gurus have :)</p>
  
  <p>Thanks.</p>