title: guava converter for Function<T, Boolean> to Predicate<T>
body: <p>In guava, is there a convenience for converting a <code>Function&lt;T, Boolean&gt;</code> to a <code>Predicate&lt;T&gt;</code>? </p>
  
  <p>In <code>Functions</code>, I can see <code>Function&lt;T, Boolean&gt; forPredicate(Predicate&lt;T&gt; predicate)</code> but I don't see anything for going in the other direction.</p>
  
  <p>The code I have to write myself currently is:</p>
  
  <pre><code>public static &lt;T&gt; Predicate&lt;T&gt; functionToPredicate(final Function&lt;T, Boolean&gt; func) {
      return new Predicate&lt;T&gt;() {
          @Override
          public boolean apply(T input) {
              return func.apply(input);
          }
      };
  }
  </code></pre>