import java.util.function.Predicate; import java.nio.file.Path; import java.nio.file.Files; public class Filter { private Predicate<String> predicate; private Path filePath; public Filter(Predicate<String> predicate, Path filePath) { this.predicate = predicate; this.filePath = filePath; } /** * Puts all lines for which the predicate evaluates to true * to stdout */ public void process() { } /** * Puts all lines for which the predicate evaluates to true * to the path specified by dest * @return true if file is written to successfully * and false if it fails. */ public boolean process(Path dest) { return false; } }