title: How to detect if a timestamp lies between two other timestamps?
body: <p>I have a HashMap that looks more or less like this:   </p>
  
  <pre><code>private HashMap&lt;String, String&gt; fu = new HashMap&lt;String, String&gt;();
  
  fu.put("16:04:00.476", "A");
  fu.put("16:09:58.228", "B");
  fu.put("16:17:58.227", "C");
  fu.put("16:22:42.478", "D");
  fu.put("16:27:23.728", "E");
  fu.put("16:38:34.977", "F");
  fu.put("16:46:46.227", "G");
  </code></pre>
  
  <p>Now I have another timestamp, called bar, and I want to find the suitable letter:</p>
  
  <pre><code>private String findLetter(String timestamp) {
     return "";
  }
  </code></pre>
  
  <p>The timestamps in the HashMap can be considered starting times. That means, A starts at 16:04:00.476 and lasts until B starts. B lasts until C starts and so on. Now, this method should return the letter in which the timestamp passed as a parameters is located in.</p>
  
  <p>The first thing I did is to convert the time stamps into a Date Object to use the Date#after method to see if it is after a certain start time, but how can I make sure that it is also before the next start time?</p>