title: How to ensure at Java 8 compile time that a method signature "implements" a functional interface
body: <p>Is there in Java 8 any analogue for <code>implements</code> keyword for methods?</p>
  
  <p>Let's say I have a functional interface:</p>
  
  <pre><code>@FunctionalInterface
  interface LongHasher {
      int hash(long x);
  }
  </code></pre>
  
  <p>And a library of 3 static methods <strong>"implementing"</strong> this functional interface:</p>
  
  <pre><code>class LongHashes {
      static int xorHash(long x) {
          return (int)(x ^ (x &gt;&gt;&gt; 32));
      }
      static int continuingHash(long x) {
          return (int)(x + (x &gt;&gt;&gt; 32));
      }
      static int randomHash(long x) {
           return xorHash(x * 0x5DEECE66DL + 0xBL);
      }
  }
  </code></pre>
  
  <p>In the future I want to be able to interchangeably use any of references to these 3 methods as a parameter. For example:</p>
  
  <pre><code>static LongHashMap createHashMap(LongHasher hasher) { ... }
  ...
  public static void main(String[] args) {
      LongHashMap map = createHashMap(LongHashes::randomHash);
      ...
  }
  </code></pre>
  
  <p>How can I ensure at compile time that <code>LongHashes::xorHash</code>, <code>LongHashes::continuingHash</code> and <code>LongHashes::randomHash</code> have the same signature as <code>LongHasher.hash(long x)</code>?</p>