title: Keep last object as active and deactivate the olders by date
body: <p>I have a <code>List&lt;MyObject&gt;</code> , with 3 properties: </p>
  
  <pre><code>public class MyObject{
      long id;
      String active; 
      java.util.Date date;
  
      public MyObject(long id, String active, Date date) {
          this.id = id;
          this.active = active;
          this.date = date;
      }
  }
  </code></pre>
  
  <p>(I know ... String hurts eyes). And this is a sample data which I'm working on:</p>
  
  <pre><code>ID  | ACTIVE | DATE
  500925  1   2017-12-01 11:43:34
  501145  1   2018-10-11 11:41:14
  501146  1   2018-10-11 11:42:51
  501147  1   2018-10-11 11:45:37
  </code></pre>
  
  <p>What I'm trying to do is setting all objects as <code>active = 0</code> with a stream, except for the most recent , which I wanna keep as active.</p>
  
  <p>I'm a bit stuck here, I can't match the correct way to do this:</p>
  
  <pre><code>myList.stream()
      .sorted(Comparator.comparing(MyObject::getDate))
      //what now?
  ;
  </code></pre>
  
  <p>The expected output should be:</p>
  
  <pre><code>ID  | ACTIVE | DATE
  500925  0   2017-12-01 11:43:34
  501145  0   2018-10-11 11:41:14
  501146  0   2018-10-11 11:42:51
  501147  1   2018-10-11 11:45:37
  </code></pre>
  
  <p>Thanks</p>