diff --git a/app/src/main/java/xl/util/XLBufferedReader.java b/app/src/main/java/xl/util/XLBufferedReader.java deleted file mode 100644 index 34ce774..0000000 --- a/app/src/main/java/xl/util/XLBufferedReader.java +++ /dev/null @@ -1,27 +0,0 @@ -package xl.util; - -import java.io.BufferedReader; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.util.Map; - -// TODO move to another package -public class XLBufferedReader extends BufferedReader { - - public XLBufferedReader(String name) throws FileNotFoundException { - super(new FileReader(name)); - } - - // TODO Change Object to something appropriate - public void load(Map map) { - try { - while (ready()) { - String string = readLine(); - int i = string.indexOf('='); - // TODO - } - } catch (Exception e) { - throw new XLException(e.getMessage()); - } - } -} diff --git a/app/src/main/java/xl/util/XLException.java b/app/src/main/java/xl/util/XLException.java index ef70535..6f0dd55 100644 --- a/app/src/main/java/xl/util/XLException.java +++ b/app/src/main/java/xl/util/XLException.java @@ -2,6 +2,10 @@ package xl.util; public class XLException extends RuntimeException { + public static final XLException ERROR_RECURSIVE = new XLException("Error: Circular Dependency"); + public static final XLException ERROR_EMPTY_REF = new XLException("Empty: Reference to empty cell"); + public static final XLException ERROR_CREATECELL = new XLException("Error: Could not create cell"); + public XLException(String message) { super(message); } diff --git a/app/src/main/java/xl/util/XLPrintStream.java b/app/src/main/java/xl/util/XLPrintStream.java deleted file mode 100644 index 8ff5525..0000000 --- a/app/src/main/java/xl/util/XLPrintStream.java +++ /dev/null @@ -1,25 +0,0 @@ -package xl.util; - -import java.io.FileNotFoundException; -import java.io.PrintStream; -import java.util.Map.Entry; -import java.util.Set; - -// TODO move to another package -public class XLPrintStream extends PrintStream { - - public XLPrintStream(String fileName) throws FileNotFoundException { - super(fileName); - } - - // TODO Change Object to something appropriate - public void save(Set> set) { - for (Entry entry : set) { - print(entry.getKey()); - print('='); - println(entry.getValue()); - } - flush(); - close(); - } -}