/** * Extract from the files passed in all those that are of the given type. * * Scan all records and select those that are of the given type, valid, and * located in the same folder. For each such record extract from the files passed in * those that belong to this record. * * @return a map linking each mapped record to its files, where the files where passed in as parameters. */ Map<LogRecord, Set<File>> getFilesOfType(Path folder, NavigableSet<File> files, Type type) { Map<LogRecord, Set<File>> ret = new HashMap<>(); records.stream() .filter(type::matches) .filter(LogRecord::isValid) .filter(r -> r.isInFolder(folder)) .forEach((r) -> ret.put(r, getRecordFiles(files, r))); return ret; }
/** * Extract from the files passed in all those that are of the given type. * * Scan all records and select those that are of the given type, valid, and * located in the same folder. For each such record extract from the files passed in * those that belong to this record. * * @return a map linking each mapped record to its files, where the files where passed in as parameters. */ Map<LogRecord, Set<File>> getFilesOfType(Path folder, NavigableSet<File> files, Type type) { Map<LogRecord, Set<File>> ret = new HashMap<>(); records.stream() .filter(type::matches) .filter(LogRecord::isValid) .filter(r -> r.isInFolder(folder)) .forEach((r) -> ret.put(r, getRecordFiles(files, r))); return ret; }
/** * Extract from the files passed in all those that are of the given type. * * Scan all records and select those that are of the given type, valid, and * located in the same folder. For each such record extract from the files passed in * those that belong to this record. * * @return a map linking each mapped record to its files, where the files where passed in as parameters. */ Map<LogRecord, Set<File>> getFilesOfType(Path folder, NavigableSet<File> files, Type type) { Map<LogRecord, Set<File>> ret = new HashMap<>(); records.stream() .filter(type::matches) .filter(LogRecord::isValid) .filter(r -> r.isInFolder(folder)) .forEach((r) -> ret.put(r, getRecordFiles(files, r))); return ret; }
/** * Extract from the files passed in all those that are of the given type. * * Scan all records and select those that are of the given type, valid, and * located in the same folder. For each such record extract from the files passed in * those that belong to this record. * * @return a map linking each mapped record to its files, where the files where passed in as parameters. */ Map<LogRecord, Set<File>> getFilesOfType(Path folder, NavigableSet<File> files, Type type) { Map<LogRecord, Set<File>> ret = new HashMap<>(); records.stream() .filter(type::matches) .filter(LogRecord::isValid) .filter(r -> r.isInFolder(folder)) .forEach((r) -> ret.put(r, getRecordFiles(files, r))); return ret; }