title: Hashtable - Get the 1st element before index
body: <p>I have this hashtable :</p>
  <pre><code>private final Hashtable&lt;Integer,Character&gt; htable = new Hashtable&lt;&gt;();
  </code></pre>
  <p>I am storing some element in the table with indexes that may reach high ranges.
  Then when i want to get an item, if it does not exist, i would like the get the first existing one before.</p>
  <p>A naive way to do it could be :</p>
  <pre><code>int index = given_index;
  while(htable.get(index) == null &amp;&amp; index &gt;= 0)
      index --;
  </code></pre>
  <p>Doing this may compute a big amount of values.
  Is there a better strategy, or maybe another sort of table allowing to compute less ?</p>