diff --git a/src/tse/lr4/NotePad.java b/src/tse/lr4/NotePad.java index 346e8aa..9034194 100644 --- a/src/tse/lr4/NotePad.java +++ b/src/tse/lr4/NotePad.java @@ -55,9 +55,14 @@ public class NotePad { this.important = important; } + @Override + public String toString() { + return getName() + ". " + getDescription(); + } + public static NotePad readFromCsvLine(String line) throws ParseException { if (line.isEmpty()) throw new RuntimeException("Пустая строка"); - String[] params = line.split(","); + String[] params = line.split("\t"); if (params.length != 4) throw new RuntimeException("Неверное количество параметров"); String name = params[0]; @@ -69,7 +74,7 @@ public class NotePad { } public String storeToCsvLine() { - final char SEPARATOR = ','; + final char SEPARATOR = '\t'; return name + SEPARATOR + description + SEPARATOR + new SimpleDateFormat(DATE_PATTERN).format(date) + SEPARATOR +