title: timerange in java
body: <p>In Java is there any way to store time ranges as key in <code>Hashmap</code>? I have one <code>HashMap</code> and I store times time range. For example:<br>
  I enter 0-50 range as key and for that key I will store some other objects as value. Now when I say 10 I should be able to get the corresponding value for that key.<br>
  Any value between 0-50 should get that object.</p>
  
  <pre><code>Map map = new HashMap();
  map.put(0-50,"some object")
  map.put(51-100,"some other object")
  </code></pre>
  
  <p>now when I say <code>map.get(10)</code> it should be able to get the "some object". Please suggest how to do this?</p>