-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathResultSaver.java
More file actions
28 lines (25 loc) · 799 Bytes
/
ResultSaver.java
File metadata and controls
28 lines (25 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package ie.atu.sw;
/**
* Saves processed results to a file
*
* This class is an abstraction to handle the saving of results,
* delegating the file-writing to the ResultSaverToFile class.
*/
public class ResultSaver {
private final ResultSaverToFile fileSaver;
/**
* Constructs a new instance used for saving results.
*/
public ResultSaver() {
this.fileSaver = new ResultSaverToFile();
}
/**
* Saves text results to the output file
*
* @param processedText the processed text to save
* @param outputFilePath the path for the output file
*/
public void saveResults(String processedText, String outputFilePath) {
fileSaver.saveResultsToOutputFile(processedText, outputFilePath);
}
}