<T> (@NotNull Collection<? extends T> elements, @Nullable Function<? super T, String> namer) { for (T t : elements) { addExistingName(namer != null ? StringUtil.notNullize(namer.fun(t)) : t.toString()); } }