private <T> String getSingleStringValue(List<T> values, Function<T, String> mapper) {

        String value = getSingleValue(values, mapper);
        if (value != null && !value.isEmpty())
            return value;

        return null;

    }
Returns the single value stored in the given list of strings,
additionally performing a mapping transformation on the single value. If
the list is empty, contains multiple values, or contains only a single
empty string, null is returned. Note that null will also be returned if
the mapping transformation returns null for the single value stored in
the list.

@param <T>
    The type of object stored in the list.

@param values
    The list to retrieve a single value from.

@param mapper
    The function to use to map the single object of type T to type R.

@return
    The single value stored in the given list, transformed using the
    provided mapping function, or null if the list is empty, contains
    multiple values, or contains only a single empty string.
extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/secret/KsmRecordService.java