an class="w">  </span><span class="p">}</span><span class="w">
</span></span></span></code></pre></div><br/>
Here are the details of the steps:  
1)  We first add each new event to our window state:
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-java" data-lang="java"><span class="line"><span class="cl"><span class="kd">static</span><span class="w"> </span><span class="o">&lt;</span><span class="n">K</span><span class="p">,</span><span class="w"> </span><span class="n">V</span