public static <R> List<R> split(String str, String p, F<String, R> f) {
        if (Strings.isEmpty(str)) {
            return Collections.emptyList();
        }
        List<R> list = new ArrayList<R>();
        String[] ss = str.trim().split(p);
        for (String s : ss) {
            R r = f.f(s);
            if (r != null) {
                list.add(r);
            }
        }
        return list;
    }
{@link java.util.function.Function} to {@link com.google.common.base.Function}.
indexr-common/src/main/java/io/indexr/util/Trick.java