title: Hashtable key within integer interval
body: <p>I don't know if this is possible but i'm trying to make an Hashtable of  where Interval is a class with 2 integer / long values, a start and an end and i wanted to make something like this:</p>
  
  <pre><code>Hashtable&lt;Interval, WhateverObject&gt; test = new Hashtable&lt;Interval, WhateverObject&gt;();
  test.put(new Interval(100, 200), new WhateverObject());
  test.get(new Interval(150, 150)) // returns the new WhateverObject i created above because 150 is betwwen 100 and 200
  test.get(new Interval(250, 250)) // doesn't find the value because there is no key that contains 250 in it's interval
  </code></pre>
  
  <p>So basically what i want is that a key between a range of values in an Interval object give the correspondent WhateverObject. I know i have to override equals() and hashcode() in the interval object, the main problem i think is to somehow have all the values between 100 and 200 (in this specific example) to give the same hash.</p>
  
  <p>Any ideias if this is possible?</p>
  
  <p>Thanks</p>