public static <T_ROW, T_FIELD, T_SUB_FIELD> FilterFieldMapper<T_ROW> of(
            final FilterFieldDefinition fieldDefinition,
            final Function<T_ROW, T_FIELD> function1,
            final Function<T_FIELD, T_SUB_FIELD> function2,
            final Function<T_SUB_FIELD, String> function3) {

        final Function<T_ROW, String> valueExtractor = row -> {
            final String result;
            if (row != null) {
                T_FIELD fieldVal = function1.apply(row);
                if (fieldVal != null) {
                    T_SUB_FIELD subFieldVal = function2.apply(fieldVal);
                    if (subFieldVal != null) {
                        return function3.apply(subFieldVal);
                    } else {
                        result = null;
                    }
                } else {
                    result = null;
                }
            } else {
                result = null;
            }
            return result;
        };
        return new FilterFieldMapper<>(fieldDefinition, valueExtractor);
    }
Overloaded factory method that allows you to define a nested value
extractor that is null safe. The value of each function is chained
in a null safe way.
stroom-util/src/main/java/stroom/util/filter/FilterFieldMapper.java