class Converters {

    public static Function<String,File[]> regexFiles( final boolean cleverNumberRegexSort )
    {
        return name ->
        {
            Comparator<File> sorting = cleverNumberRegexSort ? BY_FILE_NAME_WITH_CLEVER_NUMBERS : BY_FILE_NAME;
            List<File> files = Validators.matchingFiles( new File( name.trim() ) );
            files.sort( sorting );
            return files.toArray( new File[files.size()] );
        };
    }

    private  Converters();

}