title: Is there any annotation in Java for C# Range attribute?
body: <p>I was looking into a <a href="https://stackoverflow.com/questions/21583800/new-type-definition-in-c-sharp">Question in SO</a> where OP wanted to validate the data whether it is within <em>valid range</em> or not when creating the object. One possible answer is to use <a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.rangeattribute%28v=vs.100%29.aspx" rel="nofollow noreferrer"><code>Range</code></a> attribute.</p>
  
  <p>So is there any way(annotation) in Java to make this happen? Or I have to use good old throwing exception from constructor for invalid entry?</p>