public static @Nullable <T, V> V getImplementation(final Class<V> clazz, final Collection<T> elements) {
    for (final T element : elements) {
      final V implementation = getImplementation(element, clazz);
      if (implementation != null) {
        return implementation;
      }
    }
    return null;
  }
public static @Nullable <T, V> V getImplementation(final Class<V> clazz, final Collection<T> elements)