Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- final Supplier<Map<String, FlightNode>> flightNodesSupplier = new TextFlightNodesSupplier(flightNodesFileName, delimiterPattern); // What if I don't want to read from a file? Okay, we can use SQLFlightNodesSupplier instead of TextFlightNodesSupplier.
- final Supplier<List<FlightQuery>> flightQueriesSupplier = new TextFlightQueriesSupplier(pathsToCalculateFileName, delimiterPattern); // What if I don't want to read from a file? Okay, we can use SQLFlightQueriesSupplier instead of TextFlightQueriesSupplier.
- final PathOutputter pathOutputter = new InOrderPathOutputter(); // What if I don't want to print out Source -> Destination, but instead want Destination -> Source? Okay, just use ReverseOrderPathOutputter instead of this.
- final OutputterType outputterType = new FileOutputterType(outputFileName); // What if I don't want to write the output to the file and instead to the Console? Okay, just do ConsoleOutputterType instead.
- final Project3 project3 = new Project3(flightNodesSupplier, flightQueriesSupplier, pathOutputter, outputterType);
- project3.execute();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement