title: NavigableMap vs. SortedMap?
body: <p>Is there any reason to use <a href="http://download.oracle.com/javase/6/docs/api/java/util/SortedMap.html" rel="noreferrer"><code>SortedMap</code></a> instead of <a href="http://download.oracle.com/javase/6/docs/api/java/util/NavigableMap.html" rel="noreferrer"><code>NavigableMap</code></a>, besides the JVM version? (<code>NavigableMap</code> has only been there since 1.6; <code>SortedMap</code> has been there since 1.2)</p>
  
  <p>I'm trying to find the value with the greatest key such that key &lt;= reference key K0. I can't seem to figure out how to do this with a <code>SortedMap</code> (if it were strictly &lt;, then I'd call <code>headMap()</code> and then <code>lastKey()</code> and then <code>get()</code>), but <a href="http://download.oracle.com/javase/6/docs/api/java/util/NavigableMap.html#floorEntry%28K%29" rel="noreferrer"><code>NavigableMap.floorEntry()</code></a> seems to be exactly what I need.</p>
  
  <hr>
  
  <p><strong>clarification:</strong> just as an example, I'm handling sparse ranges of version numbers with different behavior models. The keys might be [0, 2, 5], so that version numbers 0 and 1 get handled by the value at key #0, version numbers 2-4 get handled by the value at key #2, and version numbers >= 5 get handled by the value at key #5.</p>