title: Java 8 : Lambda Function and Generic Wildcards
body: <p>I have the following class </p>
  
  <pre><code>class Book implement Borrowable  {
      @Override
      public String toString(Function&lt;? extends Borrowable
                              , String&gt; format) {
            return format.apply(this);    
      }
  }
  </code></pre>
  
  <p>This gives me an error that i cannot use "apply" on this(Book object).</p>
  
  <p>My current formatter is <br/></p>
  
  <pre><code> Function&lt;Book, String&gt; REGULAR_FORMAT = book -&gt; "name='" + book.name + '\'' +
          ", author='" + book.author + '\'' +
          ", year=" + book.year;
  </code></pre>
  
  <p>I don't want to make the lambda function of the type<br/>
  <br/></p>
  
  <pre><code>Function&lt;Borrowable, String&gt;
  </code></pre>
  
  <p>as I would lose access to the members of Book not exposed by Borrowable.     </p>