guava/src/com/google/common/collect/Interners.java
public static <E> Function<E, E> asFunction(Interner<E> interner) {
    return new InternerFunction<E>(checkNotNull(interner));
  }
public static <E> Function<E, E> asFunction(Interner<E> interner) {
    return new InternerFunction<E>(checkNotNull(interner));
  }
Returns a function that delegates to the {@link Interner#intern} method of the given interner.

@since 8.0