title: Collectors.toMap() keyMapper -- more succinct expression?
body: <p>I'm trying to come up with a more succinct expression for the "keyMapper" function parameter in the following <code>Collectors.toMap()</code> call: </p>
  
  <pre><code>List&lt;Person&gt; roster = ...;
  
  Map&lt;String, Person&gt; map = 
      roster
          .stream()
          .collect(
              Collectors.toMap(
                  new Function&lt;Person, String&gt;() { 
                      public String apply(Person p) { return p.getLast(); } 
                  },
                  Function.&lt;Person&gt;identity()));
  </code></pre>
  
  <p>It seems that I should be able to inline it using a lambda expression, but I cannot come up with one that compiles. (I'm quite new to lambdas, so that's not much of a surprise.)</p>
  
  <p>Thanks.</p>
  
  <p>--> Update: </p>
  
  <p>As noted in the accepted answer</p>
  
  <pre><code>Person::getLast
  </code></pre>
  
  <p>is what I was looking for, and is something I had tried. However, the BETA_8 nightly build of Eclipse 4.3 was the problem -- it flagged that as wrong. When compiled from the command-line (which I should have done before posting), it worked. So, time to file a bug with eclipse.org.</p>
  
  <p>Thanks.</p>