Back to project page TrackEveryPenny.
The source code is released under:
Apache License
If you think the Android project TrackEveryPenny listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package ca.jbrains.upfp.presenter; //from ww w.j a va 2 s .c om import ca.jbrains.upfp.model.Transaction; import ca.jbrains.upfp.view.CsvFormat; import java.io.IOException; import java.util.List; public class ExportAllTransactionsAsCsvToFileAction implements ExportAllTransactionsAction { private final CsvFormat<List<Transaction>> transactionsFileFormat; private WriteTextAction writeTextAction; public ExportAllTransactionsAsCsvToFileAction( CsvFormat<List<Transaction>> transactionsFileFormat, WriteTextAction writeTextAction ) { this.transactionsFileFormat = transactionsFileFormat; this.writeTextAction = writeTextAction; } public void execute(List<Transaction> transactions) throws IOException { final String text = transactionsFileFormat.format( transactions); writeTextAction.writeText(text); } }