title: Java8 Stream : Collect elements after a condition is met
body: <p>My POJO is as follows</p>
  
  <pre><code>class EventUser {
    private id;
    private userId;
    private eventId;
  }
  </code></pre>
  
  <p>I retrieve EventUser object as follows:</p>
  
  <pre><code>List&lt;EventUser&gt; eventUsers = eventUserRepository.findByUserId(userId);
  </code></pre>
  
  <p>Say the 'eventUsers' is as follows:</p>
  
  <pre><code>[
  {"id":"id200","userId":"001","eventId":"1010"},
  {"id":"id101","userId":"001","eventId":"4212"},
  {"id":"id402","userId":"001","eventId":"1221"},
  {"id":"id301","userId":"001","eventId":"2423"},
  {"id":"id701","userId":"001","eventId":"5423"},
  {"id":"id601","userId":"001","eventId":"7423"}
  ]
  </code></pre>
  
  <p>Using streaming, and without using any intermediate variable , how can I filter and collect events after a given EventUser.id:
  ex:</p>
  
  <pre><code>List&lt;EventUser&gt; filteredByOffSet = eventUsers.stream.SOMEFILTER_AND_COLLECT("id301");
  </code></pre>
  
  <p>the result should be :</p>
  
  <pre><code>[{"id":"id301","userId":"001","eventId":"2423"},
  {"id":"id701","userId":"001","eventId":"5423"},
  {"id":"id601","userId":"001","eventId":"7423"}]
  </code></pre>