title: Java 8 interfaces
body: <p>I have:</p>
  
  <pre><code>public class CustomSheet extends XSSFSheet implements customSheetsI
  </code></pre>
  
  <p>In XSSFSheet there is a method,</p>
  
  <pre><code>public XSSFWorkbook getWorkbook() {
      return (XSSFWorkbook)this.getParent();
  }
  </code></pre>
  
  <p>In my customSheet class I want to Override the getWorkbook method (or add a new getCustomWorkbook) casting the Workbook to a customWorkbook. I can do it in every instance of my interface, but I would like to take advantage of Java 8 and write the method directly in the interface.</p>
  
  <p>Something like this</p>
  
  <pre><code>    public interface customSheetsI&lt;T extends XSSFSheet&gt;
      {
          default LogChunkWorkbook getLogWorkbook() {
              return (LogChunkWorkbook)getWorkbook();
          }
  ..
  </code></pre>
  
  <p>using the getWorkbook from the super class XSSFSheet. But it doesn't work like I wrote. It doesn't know about getWorkbook. How can I do this?</p>