|
1 | 1 | /*
|
2 |
| - * Copyright (C) 2018 Heinrich-Heine-Universitaet Duesseldorf, Institute of Computer Science, Department Operating Systems |
| 2 | + * Copyright (C) 2017 Heinrich-Heine-Universitaet Duesseldorf, Institute of Computer Science, Department Operating Systems |
3 | 3 | *
|
4 | 4 | * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
|
5 | 5 | * the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
|
11 | 11 | * along with this program. If not, see <http://www.gnu.org/licenses/>
|
12 | 12 | */
|
13 | 13 |
|
14 |
| -package de.hhu.bsinfo.dxmonitor.error; |
| 14 | +package de.hhu.bsinfo.dxmonitor; |
15 | 15 |
|
16 | 16 | /**
|
17 |
| - * @author Burak Akguel, [email protected], 23.11.17 |
| 17 | + * Interface for generating CSV data strings from objects |
| 18 | + * |
| 19 | + * @author Stefan Nothaas, [email protected], 20.02.2018 |
18 | 20 | */
|
19 |
| -public class CantReadFileException extends Exception { |
| 21 | +public interface CSVPrinter { |
| 22 | + /** |
| 23 | + * Create the header which describes the data |
| 24 | + * |
| 25 | + * @param p_delim The delimiter to use to separate values |
| 26 | + * @return CSV header line which describes the data |
| 27 | + */ |
| 28 | + String generateCSVHeader(final char p_delim); |
| 29 | + |
20 | 30 | /**
|
21 |
| - * Throws an Exception because the given path is invalid. |
| 31 | + * Print the object/data as a single CSV line |
22 | 32 | *
|
23 |
| - * @param p_file |
24 |
| - * Path of the file |
| 33 | + * @param p_delim The delimiter to use to separate values |
| 34 | + * @return CSV line which contains the data of the object |
25 | 35 | */
|
26 |
| - public CantReadFileException(final String p_file) { |
27 |
| - super("Error: Couldn't read from file " + p_file + '!'); |
28 |
| - } |
| 36 | + String toCSV(final char p_delim); |
29 | 37 | }
|
0 commit comments